Picture prediction method and picture prediction apparatus

ABSTRACT

A picture prediction method includes: determining motion vectors of W control points in a current picture block; obtaining motion vectors of P pixel units of the current picture block by using a motion model and the motion vectors of the W control points, where precision of the determined motion vectors of the W control points is 1/n of pixel precision, precision of the motion vector of each of the P pixel units is 1/N of the pixel precision, the motion vector of each of the P pixel units is used to determine a corresponding reference pixel unit in a reference picture of a corresponding pixel unit; and performing interpolation filtering on a pixel of the corresponding reference pixel unit by using an interpolation filter with a phase of Q, to obtain a predicted pixel value of each of the P pixel units.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/734,586, filed on Jan. 6, 2020, which is a continuation of U.S.patent application Ser. No. 15/855,005, filed on Dec. 27, 2017, now U.S.Pat. No. 10,560,714 which is a continuation of International ApplicationNo. PCT/CN2016/087750, filed on Jun. 29, 2016. The InternationalApplication claims priority to Chinese Patent Application No.201510391765.7, filed on Jul. 3, 2015. All of the afore-mentioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the field of video encoding and videodecoding, and specifically, to a picture prediction method and a relateddevice.

BACKGROUND

With development of an optoelectronic collection technology and anincreasing requirement for a high-definition digital video, a video datavolume becomes increasingly large. Limited heterogeneous transmissionbandwidth and diversified video applications impose a higher requirementon video coding efficiency. In this case, the High Efficiency VideoCoding (HEVC) standard starts to be formulated as required.

A basic principle of video coding compression is using correlationbetween a space domain, a time domain, and a codeword to eliminateredundancy as much as possible. At present, a common manner is using ablock-based hybrid video coding framework to implement video codingcompression by means of steps such as prediction (including intra-frameprediction and inter-frame prediction), transformation, quantization,and entropy coding. This coding framework is powerful, and theblock-based hybrid video coding framework is also used for HEVC.

In various video encoding/decoding schemes, motion estimation/motioncompensation is a key technology affecting encoding/decodingperformance. In many existing video encoding/decoding schemes, it isgenerally assumed that a motion of an object meets a requirement of atranslational motion model, and various parts of the entire object arein a same motion. An existing motion estimation/motion compensationalgorithm is basically a block-based motion compensation algorithm basedon a translational motion model (English: translational motion model).Existing inter-frame prediction is mainly block-based motioncompensation (English: motion compensation) prediction based on atranslational motion model. Some non-translational motion models (forexample, an affine motion model) designed for non-translational motionsgradually emerge.

In a prediction mechanism based on an affine motion model, low-precisionmotion vectors of two control points in a current picture block and theaffine motion model may be used to perform pixel value prediction in theprior art, so as to obtain a low-precision predicted pixel value of thecurrent picture block. During a process of the pixel value prediction,an interpolation filter needs to be used to perform an interpolationfiltering operation. Precision of the obtained predicted pixel value ofthe current picture block is the same as precision of the motion vectorsof the two control points. If a higher-precision predicted pixel valueof the current picture block needs to be obtained, a bilinearinterpolation filter is further required to perform secondaryinterpolation filtering on the obtained lower-precision predicted pixelvalue of the current picture block.

In the prior art, if the lower-precision motion vectors of the twocontrol points and the affine motion model are used to obtain thehigher-precision predicted pixel value of the current picture block, atleast two interpolation filtering operations need to be performed (arelatively large quantity of intermediate caches and memory operationsare required for each interpolation filtering operation). As a result, arelatively large quantity of intermediate caches and memory operationsmay be required during an entire picture prediction process, andcalculation complexity becomes relatively high.

SUMMARY

Embodiments of the present disclosure provide a picture predictionmethod and a related device, so as to reduce a quantity of intermediatecaches and memory operations that are required for interpolationfiltering during a picture prediction process, and reduce calculationcomplexity during the picture prediction process.

A first aspect of the embodiments of the present disclosure provides apicture prediction method, including:

determining motion vectors of W control points in a current pictureblock;

obtaining, by means of calculation, motion vectors of P pixel units ofthe current picture block by using a motion model and the motion vectorsof the W control points, where precision of the determined motionvectors of the W control points is 1/n of pixel precision, precision ofthe motion vector that is obtained by means of calculation and that isof each of the P pixel units is 1/N of the pixel precision, the P pixelunits are some or all of pixel units of the current picture block, themotion vector of each of the P pixel units is used to determine acorresponding reference pixel unit, in a reference picture, of acorresponding pixel unit, W, n, and N are integers greater than 1, N isgreater than n, and P is a positive integer; and

performing interpolation filtering on a pixel of the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using an interpolation filter with a phase of Q, to obtain apredicted pixel value of each of the P pixel units, where Q is aninteger greater than n.

With reference to the first aspect, in a first possible implementationof the first aspect, a value of N is a preset fixed value, and Q is lessthan or equal to N.

With reference to the first aspect or the first possible implementationof the first aspect, in a second possible implementation of the firstaspect, a horizontal component or a vertical component of one of themotion vectors of the W control points is amplified N times in themotion model by using N, or a component difference between motionvectors of any two of the W control points is amplified N times in themotion model by using N.

With reference to the first aspect, the first possible implementation ofthe first aspect, or the second possible implementation of the firstaspect, in a third possible implementation of the first aspect, theperforming interpolation filtering on a pixel of the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using an interpolation filter with a phase of Q includes:

obtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units; determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, wherea filter coefficient used by the interpolation filter is correspondingto the phase; and performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

With reference to the third possible implementation of the first aspect,in a fourth possible implementation of the first aspect, the obtaining,by means of calculation, a phase of each of the P pixel units by usingthe motion vector of each of the P pixel units includes: obtaining, bymeans of calculation, the phase of each of the P pixel units accordingto the following formula by using the motion vector of each of the Ppixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1);whereY′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1);

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block, Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

With reference to the third possible implementation of the first aspector the fourth possible implementation of the first aspect, in a fifthpossible implementation of the first aspect, the phase includes ahorizontal phase and a vertical phase; and the determining, based on thephase of each pixel unit, the interpolation filter with the phase of Qthat is corresponding to the pixel unit includes: determining, based onthe horizontal phase of each pixel unit, a horizontal interpolationfilter with a phase of Q that is corresponding to the correspondingpixel unit; and determining, based on the vertical phase of each pixelunit, a vertical interpolation filter with a phase of Q that iscorresponding to the corresponding pixel unit, where a filtercoefficient used by the horizontal interpolation filter is correspondingto the horizontal phase, and a filter coefficient used by the verticalinterpolation filter is corresponding to the vertical phase.

With reference to the fifth possible implementation of the first aspect,in a sixth possible implementation of the first aspect, the performinginterpolation filtering on the pixel of the corresponding referencepixel unit, in the reference picture, of each pixel unit by using thedetermined interpolation filter with the phase of Q that iscorresponding to the pixel unit includes:

performing horizontal interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit i by using a determined horizontal interpolation filter with aphase of Q that is corresponding to the pixel unit i, to obtain ahorizontal interpolation filtering result; and performing verticalinterpolation filtering on the horizontal interpolation filtering resultby using a determined vertical interpolation filter with a phase of Qthat is corresponding to the pixel unit i, to obtain a predicted pixelvalue of the pixel unit i, where the pixel unit i is any one of the Ppixel units; or

performing vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and performing horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

With reference to any one of the first aspect, or the first to the sixthpossible implementations of the first aspect, in a seventh possibleimplementation of the first aspect, the motion model is a translationalmotion model, an affine motion model, a rotational motion model, aparabolic motion model, a shearing motion model, a zooming motion model,a perspective motion model, or a bilinear motion model.

With reference to any one of the first aspect, or the first to theseventh possible implementations of the first aspect, in an eighthpossible implementation of the first aspect, the motion model isrepresented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)/n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)/n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N/n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N/n} \right)}{L}y} + {\left( {N/n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N/n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N/n} \right)}{L}y} + {\left( {N/n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$

where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

With reference to any one of the first aspect, or the first to theseventh possible implementations of the first aspect, in a ninthpossible implementation of the first aspect, the motion model isrepresented as follows when W is equal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)/n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)/n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N/n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N/n} \right)}{h}y} + {\left( {N/n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N/n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N/n} \right)}{h}y} + {\left( {N/n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

With reference to any one of the first aspect, or the first to the ninthpossible implementations of the first aspect, in a tenth possibleimplementation of the first aspect, the motion vectors of the W controlpoints are predicted based on a motion vector, whose precision is 1/n ofthe pixel precision, of an encoded picture block or a decoded pictureblock that surrounds the current picture block.

With reference to any one of the first aspect, or the first to the tenthpossible implementations of the first aspect, in an eleventh possibleimplementation of the first aspect, the picture prediction method isapplied to a video encoding process or applied to a video decodingprocess.

A second aspect of the embodiments of the present disclosure provides apicture prediction apparatus, including:

a first determining unit, configured to determine motion vectors of Wcontrol points in a current picture block:

a calculation unit, configured to obtain, by means of calculation,motion vectors of P pixel units of the current picture block by using amotion model and the motion vectors of the W control points, whereprecision of the determined motion vectors of the W control points is1/n of pixel precision, precision of the motion vector that is obtainedby means of calculation and that is of each of the P pixel units is 1/Nof the pixel precision, the P pixel units are some or all of pixel unitsof the current picture block, the motion vector of each of the P pixelunits is used to determine a corresponding reference pixel unit, in areference picture, of a corresponding pixel unit, W, n, and N areintegers greater than 1, N is greater than n, and P is a positiveinteger; and

an interpolation filtering unit, configured to perform interpolationfiltering on a pixel of the corresponding reference pixel unit, in thereference picture, of each of the P pixel units by using aninterpolation filter with a phase of Q, to obtain a predicted pixelvalue of each of the P pixel units, where Q is an integer greater thann.

With reference to the second aspect, in a first possible implementationof the second aspect, a value of N is a preset fixed value, and Q isless than or equal to N.

With reference to the second aspect or the first possible implementationof the second aspect, in a second possible implementation of the secondaspect, a horizontal component or a vertical component of one of themotion vectors of the W control points is amplified N times in themotion model by using N, or a component difference between motionvectors of any two of the W control points is amplified N times in themotion model by using N.

With reference to the second aspect, the first possible implementationof the second aspect, or the second possible implementation of thesecond aspect, in a third possible implementation of the second aspect,the interpolation filtering unit is specifically configured to: obtain,by means of calculation, a phase of each of the P pixel units by usingthe motion vector of each of the P pixel units; determine, based on thephase of each pixel unit, the interpolation filter with the phase of Qthat is corresponding to the corresponding pixel unit, where a filtercoefficient used by the interpolation filter is corresponding to thephase; and perform interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

With reference to the third possible implementation of the secondaspect, in a fourth possible implementation of the second aspect, in anaspect of obtaining, by means of calculation, a phase of each of the Ppixel units by using the motion vector of each of the P pixel units, theinterpolation filtering unit is specifically configured to obtain, bymeans of calculation, the phase of each of the P pixel units accordingto the following formula by using the motion vector of each of the Ppixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1);Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1);

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block, Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

With reference to the third possible implementation of the second aspector the fourth possible implementation of the second aspect, in a fifthpossible implementation of the second aspect, the phase includes ahorizontal phase and a vertical phase; and in an aspect of determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, theinterpolation filtering unit is specifically configured to: determine,based on the horizontal phase of each pixel unit, a horizontalinterpolation filter with a phase of Q that is corresponding to thecorresponding pixel unit; and determine, based on the vertical phase ofeach pixel unit, a vertical interpolation filter with a phase of Q thatis corresponding to the corresponding pixel unit, where a filtercoefficient used by the horizontal interpolation filter is correspondingto the horizontal phase, and a filter coefficient used by the verticalinterpolation filter is corresponding to the vertical phase.

With reference to the fifth possible implementation of the secondaspect, in a sixth possible implementation of the second aspect, in anaspect of performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit, theinterpolation filtering unit is specifically configured to: performhorizontal interpolation filtering on a pixel of a correspondingreference pixel unit, in the reference picture, of a pixel unit i byusing a determined horizontal interpolation filter with a phase of Qthat is corresponding to the pixel unit i, to obtain a horizontalinterpolation filtering result; and perform vertical interpolationfiltering on the horizontal interpolation filtering result by using adetermined vertical interpolation filter with a phase of Q that iscorresponding to the pixel unit i, to obtain a predicted pixel value ofthe pixel unit i, where the pixel unit i is any one of the P pixelunits; or the interpolation filtering unit is specifically configuredto: perform vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and perform horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

With reference to any one of the second aspect, or the first to thesixth possible implementations of the second aspect, in a seventhpossible implementation of the second aspect, the motion model is atranslational motion model, an affine motion model, a rotational motionmodel, a zooming motion model, a parabolic motion model, a shearingmotion model, a perspective motion model, or a bilinear motion model.

With reference to any one of the second aspect, or the first to theseventh possible implementations of the second aspect, in an eighthpossible implementation of the second aspect, the motion model isrepresented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)/n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)/n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N/n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N/n} \right)}{L}y} + {\left( {N/n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N/n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N/n} \right)}{L}y} + {\left( {N/n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(x)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

With reference to any one of the second aspect, or the first to theseventh possible implementations of the second aspect, in a ninthpossible implementation of the second aspect, the motion model isrepresented as follows when W is equal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

With reference to any one of the second aspect, or the first to theninth possible implementations of the second aspect, in a tenth possibleimplementation of the second aspect, the motion vectors of the W controlpoints are predicted based on a motion vector, whose precision is 1/n ofthe pixel precision, of an encoded picture block or a decoded pictureblock that surrounds the current picture block.

With reference to any one of the second aspect, or the first to thetenth possible implementations of the second aspect, in an eleventhpossible implementation of the second aspect, the picture predictionapparatus is applied to a video encoding apparatus or the pictureprediction apparatus is applied to a video decoding apparatus.

An embodiment of the present disclosure further provides a pictureprediction apparatus, including a processor and a memory. The pictureprediction apparatus may further include, for example, a networkinterface. The memory is configured to store an instruction, theprocessor is configured to execute the instruction, and the networkinterface is configured to communicate, under control of the processor,with another device.

For example, the processor is configured to: determine motion vectors ofW control points in a current picture block; obtain, by means ofcalculation, motion vectors of P pixel units of the current pictureblock by using a motion model and the motion vectors of the W controlpoints, where precision of the determined motion vectors of the Wcontrol points is 1/n of pixel precision, precision of the motion vectorthat is obtained by means of calculation and that is of each of the Ppixel units is 1/N of the pixel precision, the P pixel units are some orall of pixel units of the current picture block, the motion vector ofeach of the P pixel units is used to determine a corresponding referencepixel unit, in a reference picture, of a corresponding pixel unit, W, n,and N are integers greater than 1. N is greater than n, and P is apositive integer; and perform interpolation filtering on a pixel of thecorresponding reference pixel unit, in the reference picture, of each ofthe P pixel units by using an interpolation filter with a phase of Q, toobtain a predicted pixel value of each of the P pixel units, where Q isan integer greater than n.

In addition, an embodiment of the present disclosure further provides acomputer readable storage medium. The computer readable storage mediumstores program code for picture prediction. The program code includes aninstruction for executing a picture prediction method.

It can be learnt that, in the picture prediction method provided in theembodiments of the present disclosure, the motion vector, whoseprecision is 1/N of the pixel precision, of each pixel unit of thecurrent picture block is obtained by means of calculation by using themotion model and the motion vectors, whose precision is 1/n of the pixelprecision, of the W control points, where N is greater than n. In otherwords, the precision of the motion vector that is obtained by means ofcalculation and that is of each pixel unit of the current picture blockis higher than the precision of the determined motion vectors of the Wcontrol points. The higher-precision motion vector is obtained first.Therefore, the higher-precision motion vector of each pixel unit of thecurrent picture block is used to determine the corresponding referencepixel unit, in the reference picture, of each pixel unit of the currentpicture block, and interpolation filtering is performed on the pixel ofthe corresponding reference pixel unit, in the reference picture, ofeach pixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity oftimes of interpolation filtering required for obtaining, by means ofprediction, the higher-precision predicted pixel value of the currentpicture block (for example, an intermediate process for obtaining alower-precision predicted pixel value by performing lower-precisioninterpolation filtering may not be required), so as to reduce a quantityof intermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentdisclosure more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present disclosure, and persons ofordinary skill in the art may still obtain other drawings from theseaccompanying drawings without creative efforts.

FIG. 1-a and FIG. 1-b are schematic diagrams of several types ofdivision of a picture block according to an embodiment of the presentdisclosure;

FIG. 2-a is a schematic flowchart of a picture prediction methodaccording to an embodiment of the present disclosure;

FIG. 2-b is a schematic diagram of prediction of motion vectors ofcontrol points according to an embodiment of the present disclosure:

FIG. 3-a is a schematic flowchart of another picture prediction methodaccording to an embodiment of the present disclosure;

FIG. 3-b is a schematic diagram of an integer-pixel location and asub-pixel location according to an embodiment of the present disclosure;

FIG. 4 is a schematic flowchart of another picture prediction methodaccording to an embodiment of the present disclosure;

FIG. 5 is a schematic diagram of a picture prediction apparatusaccording to an embodiment of the present disclosure; and

FIG. 6 is a schematic diagram of another picture prediction apparatusaccording to an embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present disclosure provide a picture predictionmethod and a related device, so as to reduce a quantity of intermediatecaches and memory operations that are required for interpolationfiltering during a picture prediction process, and reduce calculationcomplexity during the picture prediction process.

In the specification, claims, and accompanying drawings of the presentdisclosure, the terms “first”, “second”, “third”, and so on are intendedto distinguish between different objects but do not indicate aparticular order. In addition, the terms “including”, “comprising”, andany other variant thereof are intended to cover a non-exclusiveinclusion. For example, a process, a method, a system, a product, or adevice that includes a series of steps or units is not limited to thelisted steps or units, but optionally further includes an unlisted stepor unit, or optionally further includes another inherent step or unit ofthe process, the method, the product, or the device.

The following first briefly describes some concepts that may be relatedto the embodiments of the present disclosure.

In most coding frameworks, a video sequence includes a series ofpictures, a picture is further divided into slices, and a slice isfurther divided into blocks. Video coding is based on a unit of a block,and coding processing may start to be performed at a location of anupper left corner of a picture and then performed line by line from leftto right and from top to bottom. In some new video coding standards, aconcept of the block is further extended. In the H.264 standard, amacroblock (MB) is described, and the MB may be further divided intomultiple prediction partitions that may be used for predictive coding.In the HEVC standard, basic concepts of a coding unit (CU), a predictionunit (PU), a transform unit (TU), and the like are used. Multiple typesof units are obtained by means of function division, and are describedby using a new tree-based structure. For example, the CU may be dividedinto smaller CUs according to a quad tree, and a smaller CU may furthercontinue to be divided to form a quad tree structure. Tree structures ofthe PU and the TU are similar to that of the CU. The CU, the PU, and theTU all belong to the concept of the block in essence. Similar to amacroblock MB or a coding block, the CU is a basic unit for dividing andencoding a coding picture. The PU is a basic unit for predictive coding,and may be corresponding to a prediction partition. According to adivision manner, the CU is further divided into multiple PUs. The TU isa basic unit for transforming a predicted residual, and may becorresponding to a transform block. In the High Efficiency Video Coding(English: high efficiency video coding, HEVC for short) standard, theCU, the PU, and the TU may be collectively referred to as a coding treeblock (English: coding tree block, CTB for short), and the like.

In the HEVC standard, the coding unit may include four levels in size:64×64, 32×32, 16×16, and 8×8. Each level of coding unit may be dividedinto prediction units of different sizes according to intra-frameprediction and inter-frame prediction. For example, as shown in FIG. 1-aand FIG. 1-b, FIG. 1-a shows a prediction unit division mannercorresponding to intra-frame prediction, and FIG. 1-b shows severalprediction unit division manners corresponding to inter-frameprediction.

During a development and evolution process of a video coding technology,experts in video coding figure out various methods to utilizespatial-temporal correlation between adjacent encoded/decoded blocks toimprove coding efficiency. In the H.264/Advanced Video Coding (English:advanced video coding, AVC for short) standard, a skip mode (skip mode)and a direct mode (direct mode) become effective means to improve codingefficiency. In a case of a low bit rate, a quantity of blocks using thetwo coding modes accounts for more than a half of blocks in an entirecoding sequence. When the skip mode is used, a motion vector of acurrent picture block may be obtained by means of derivation by using asurrounding motion vector provided that a skip mode tag is transferredin a bitstream, and a value of a reference block is directly used as areconstruction value of the current picture block according to themotion vector. Alternatively, when the direct mode is used, an encodermay obtain, by means of derivation, a motion vector of a current pictureblock by using a surrounding motion vector, directly use a value of areference block as a predicted value of the current picture blockaccording to the motion vector, and perform predictive coding on thecurrent picture block on an encoder side by using the predicted value.At present, some new coding means are used in the latest High EfficiencyVideo Coding (English: high efficiency video coding, HEVC for short)standard, to further improve video coding performance. A merge codingmode and an advanced motion vector prediction (AMVP) mode are twoimportant inter-frame prediction means. In the merge coding mode, motioninformation (including a motion vector (MV), a prediction direction, areference-frame index, and the like) of a coded block that surrounds acurrent coding block is used to form a set of candidate motioninformation. Candidate motion information with highest coding efficiencymay be selected, by means of comparison, as motion information of thecurrent coding block. Predictive coding is performed on the currentcoding block by using a predicted value, found in a reference frame, ofthe current coding block. In addition, an index value indexing aspecific surrounding coded block from which motion information isselected may be written into a bitstream. When the advanced motionvector prediction mode is used, a motion vector of a surrounding codedblock is used as a predicted value of a motion vector of a currentcoding block, a motion vector with highest coding efficiency may beselected to predict the motion vector of the current coding block, andan index value indicating selection of a specific surrounding motionvector may be written into a video bitstream.

The following continues to describe the technical solutions of theembodiments of the present disclosure.

The following first describes the picture prediction method provided inthe embodiments of the present disclosure. The picture prediction methodprovided in the embodiments of the present disclosure is executed by avideo encoding apparatus or a video decoding apparatus. The videoencoding apparatus or the video decoding apparatus may be any apparatusthat needs to output or store a video, for example, a notebook computer,a tablet computer, a personal computer, a mobile phone, a video server,or another device.

In an embodiment of the picture prediction method provided in thepresent disclosure, the picture prediction method may include:determining motion vectors of W control points in a current pictureblock; obtaining, by means of calculation, motion vectors of P pixelunits of the current picture block by using a motion model and themotion vectors of the W control points, where precision of thedetermined motion vectors of the W control points is 1/n of pixelprecision, precision of the motion vector that is obtained by means ofcalculation and that is of each of the P pixel units is 1/N of the pixelprecision, the P pixel units are some or all of pixel units of thecurrent picture block, the motion vector of each of the P pixel units isused to determine a corresponding reference pixel unit, in a referencepicture, of a corresponding pixel unit, W, n, and N are integers greaterthan 1, N is greater than n, and P is a positive integer; and performinginterpolation filtering on a pixel of the corresponding reference pixelunit, in the reference picture, of each of the P pixel units by using aninterpolation filter with a phase of Q, to obtain a predicted pixelvalue of each of the P pixel units, where Q is an integer greater thann.

Referring to FIG. 2-a, FIG. 2-a is a schematic flowchart of a pictureprediction method according to an embodiment of the present disclosure.In an example shown in FIG. 2-a, the picture prediction method providedin this embodiment of the present disclosure may include the followingsteps.

201. Determine motion vectors of W control points in a current pictureblock.

202. Obtain, by means of calculation, motion vectors of P pixel units ofthe current picture block by using a motion model and the motion vectorsof the W control points.

The P pixel units are some or all of pixel units of the current pictureblock.

A motion vector of each of the P pixel units is used to determine acorresponding reference pixel unit, in a reference picture, of acorresponding pixel unit. Therefore, the motion vector of each of the Ppixel units may be used to determine the corresponding reference pixelunit, in the reference picture, of the corresponding pixel unit.

Precision of the determined motion vectors of the W control points is1/n of pixel precision.

Precision of the motion vector that is obtained by means of calculationand that is of each of the P pixel units is 1/N of the pixel precision.

W, n, and N are integers greater than 1.

N is greater than n. P is a positive integer.

Because N is greater than n, the precision of the motion vector that isobtained by means of calculation and that is of each of the P pixelunits is higher than the precision of the determined motion vectors ofthe W control points. That is, the higher-precision motion vectors ofthe P pixel units of the current picture block are obtained.

In some possible implementations of the present disclosure, the motionvectors of the W control points are predicted based on a motion vector,whose precision is 1/n of the pixel precision, of an encoded pictureblock or a decoded picture block that surrounds the current pictureblock.

In an example shown in FIG. 2-b, the W control points include a controlpoint LT, a control point RT, and a control point LB. A motion vector ofthe control point LT may be predicted based on motion vectors, whoseprecision is 1/n of the pixel precision, of picture blocks A, B, and C.A motion vector of the control point RT may be predicted based on motionvectors, whose precision is 1/n of the pixel precision, of pictureblocks D and E. A motion vector of the control point LB may be predictedbased on motion vectors, whose precision is 1/n of the pixel precision,of picture blocks F and G.

In some possible implementations of the present disclosure, when themotion vectors of the W control points are based on predicted values,precision of the predicted values is also 1/n of the pixel precision,and differences between the motion vectors, whose precision is 1/n ofthe pixel precision, of the control points and the correspondingpredicted values may be written into a bitstream.

In some possible implementations of the present disclosure, the motionmodel may be, for example, a translational motion model, an affinemotion model, a rotational motion model, a parabolic motion model, ashearing motion model, a zooming motion model, a perspective motionmodel, or a bilinear motion model.

203. Perform interpolation filtering on a pixel of a reference pixelunit, in a reference picture, of each of the P pixel units by using aninterpolation filter with a phase of Q, to obtain a predicted pixelvalue of each of the P pixel units.

Q is an integer greater than n.

In some possible implementations of the present disclosure, a value of Nmay be a preset fixed value, and Q may be less than or equal to N. Whenthe value of N may be a preset fixed value, it indicates that theprecision of the motion vectors, obtained by means of calculation byusing the motion model and the motion vectors of the W control points,of the P pixel units of the current picture block is unnecessarilyrelated to a size of the current picture block. In other words, forexample, based on the solution of this embodiment, the predicted pixelvalue with preset fixed precision can be obtained without anintermediate process for obtaining a lower-precision predicted pixelvalue by performing lower-precision interpolation filtering.

For example, W may be equal to 2, 3, 4, 5, 6, 8, or another value.

For example, P may be equal to 1, 2, 3, 4, 5, 6, 8, 10, 15, 16, 21, 32,64, or another value.

For example, Q may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, N may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, n may be equal to 8, 2, 4, or another value.

In some possible implementations of the present disclosure, N may be anintegral power of 2, or certainly, N may be another positive integer.

A pixel unit in the embodiments of the present disclosure may includeone or more pixels. For example, the pixel unit may be a 2×2 pixelblock, a 2×1 pixel block, a 2×1 pixel block, a 4×4 pixel block, or a 4×2pixel block.

A control point in the embodiments of the present disclosure may includeone or more pixels. For example, the control point may be a 2×2 pixelblock, a 2×1 pixel block, a 2×1 pixel block, a 4×4 pixel block, or a 4×2pixel block.

It can be learnt from the foregoing that, in the picture predictionmethod provided in this embodiment, the motion vector, whose precisionis 1/N of the pixel precision, of each pixel unit of the current pictureblock is obtained by means of calculation by using the motion model andthe motion vectors, whose precision is 1/n of the pixel precision, ofthe W control points, where N is greater than n. In other words, theprecision of the motion vector that is obtained by means of calculationand that is of each pixel unit of the current picture block is higherthan the precision of the determined motion vectors of the W controlpoints. The higher-precision motion vector is obtained first. Therefore,the higher-precision motion vector of each pixel unit of the currentpicture block is used to determine the corresponding reference pixelunit, in the reference picture, of each pixel unit of the currentpicture block, and interpolation filtering is performed on the pixel ofthe corresponding reference pixel unit, in the reference picture, ofeach pixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity ofinterpolation filtering required for obtaining, by means of prediction,the higher-precision predicted pixel value of the current picture block(for example, an intermediate process for obtaining the lower-precisionpredicted pixel value by performing lower-precision interpolationfiltering may not be required), so as to reduce a quantity ofintermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

In some possible implementations of the present disclosure, a horizontalcomponent or a vertical component of one of the motion vectors of the Wcontrol points is amplified N times in the motion model by using N, or acomponent difference between motion vectors of any two of the W controlpoints is amplified N times in the motion model by using N.

For example, in some possible implementations of the present disclosure,the motion model may be represented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

For another example, in some possible implementations of the presentdisclosure, the motion model may be represented as follows when W isequal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

The foregoing examples are described by using the affine motion model.When a translational motion model, a rotational motion model, a shearingmotion model, a zooming motion model, a perspective motion model, aparabolic motion model, a bilinear motion model, or the like is used,reference may be made to the foregoing examples. Details are notdescribed herein again.

For example, a general representation form of a motion model may be asfollows:(v _(Nx) ,v _(Ny))=∫({(v _(ix) ,v _(iy))|i=0,1, . . . ,M},N,(x,y)),where

precision of a motion vector (v_(ix),v_(iy)) of a control point is 1/nof pixel precision, and to balance an effect and bit overheads, a valueof n may be set to 4; N may represent a preset phase of a filter; and(x, y) represents coordinate values of any pixel unit in a pictureblock; and

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, and v_(Ny)represents a vertical component of the motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block.

Optionally, in some possible implementations of the present disclosure,the determining the corresponding reference pixel unit, in the referencepicture, of each of the P pixel units by using the motion vector of eachof the P pixel units may include: obtaining, by means of calculation, aninteger-pixel location of each of the P pixel units by using the motionvector of each of the P pixel units; and searching, by using the motionvector of each of the P pixel units, the reference picture for areference pixel unit corresponding to the integer-pixel location of eachof the P pixel units, where the reference pixel unit that iscorresponding to the integer-pixel location of each of the P pixel unitsand that is found in the reference picture is the reference pixel unit,in the reference picture, of each of the P pixel units.

Specifically, for example, an integer-pixel location of a pixel unit imay be obtained by means of calculation by using a motion vector of thepixel unit i of the P pixel units, and the reference picture may besearched, by using the motion vector of the pixel unit i, for areference pixel unit corresponding to the integer-pixel location of thepixel unit i, where the reference pixel unit that is corresponding tothe integer-pixel location of the pixel unit i and that is found in thereference picture is a reference pixel unit, in the reference picture,of the pixel unit i. The pixel unit i may be any one of the P pixelunits. For example, the corresponding reference pixel unit, in thereference picture, of each of the P pixel units may be determinedaccording to a manner similar to that of determining the reference pixelunit, in the reference picture, of the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, an integer-pixel location of each ofthe P pixel units by using the motion vector of each of the P pixelunits includes:

obtaining, by means of calculation, the integer-pixel location of eachof the P pixel units according to the following formula by using themotion vector of each of the P pixel units:x Int=[v _(Nx) /N], or x Int=v _(Nx) ≥M;y Int=[v _(Ny) /N], or y Int=v _(Ny) ≥M;

-   -   where

M is equal to log₂ N when N is an integral power of 2, (xInt, yInt)represents integer-pixel location coordinates of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Nx) represents ahorizontal component of a motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, and v_(Ny) represents a vertical component of themotion vector, whose precision is 1/N of the pixel precision, of thepixel unit with the coordinates of (x, y) in the current picture block.

In some possible implementations of the present disclosure, theperforming interpolation filtering on a pixel of the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using an interpolation filter with a phase of Q includes:

obtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units; determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, wherea filter coefficient used by the interpolation filter is correspondingto the phase; and performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

Specifically, for example, a phase of the pixel unit i may be obtainedby means of calculation by using the motion vector of the pixel unit iof the P pixel units; an interpolation filter with a phase of Q that iscorresponding to the pixel unit i may be determined based on the phaseof the pixel unit i, where a filter coefficient used by theinterpolation filter is corresponding to the phase; and interpolationfiltering may be performed on a pixel of the corresponding referencepixel unit, in the reference picture, of the pixel unit i by using thedetermined interpolation filter with the phase of Q that iscorresponding to the pixel unit i. The pixel unit i may be any one ofthe P pixel units. For example, interpolation filtering may be performedon each of the P pixel units according to a manner similar to that ofperforming interpolation filtering on the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units includes:obtaining, by means of calculation, the phase of each of the P pixelunits according to the following formula by using the motion vector ofeach of the P pixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1).Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1).

-   -   where

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block, Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the phase includes a horizontal phase and a vertical phase; and thedetermining, based on the phase of each pixel unit, the interpolationfilter with the phase of Q that is corresponding to the pixel unitincludes: determining, based on the horizontal phase of each pixel unit,a horizontal interpolation filter with a phase of Q that iscorresponding to the corresponding pixel unit; and determining, based onthe vertical phase of each pixel unit, a vertical interpolation filterwith a phase of Q that is corresponding to the corresponding pixel unit,where a filter coefficient used by the horizontal interpolation filteris corresponding to the horizontal phase, and a filter coefficient usedby the vertical interpolation filter is corresponding to the verticalphase.

Specifically, for example, a horizontal interpolation filter with aphase of Q that is corresponding to the pixel unit i may be determinedbased on a horizontal phase of the pixel unit i, and a verticalinterpolation filter with a phase of Q that is corresponding to thepixel unit i may be determined based on a vertical phase of the pixelunit i, where a filter coefficient used by the horizontal interpolationfilter is corresponding to the horizontal phase of the pixel unit i, anda filter coefficient used by the vertical interpolation filter iscorresponding to the vertical phase of the pixel unit i. The pixel uniti may be any one of the P pixel units. For example, the interpolationfilter with the phase of Q that is corresponding to each of the P pixelunits may be determined according to a manner similar to that ofdetermining the interpolation filter with the phase of Q that iscorresponding to the pixel unit i.

Optionally, in some possible implementations of the present disclosure,the performing interpolation filtering on the pixel of the correspondingreference pixel unit, in the reference picture, of each pixel unit byusing the determined interpolation filter with the phase of Q that iscorresponding to the pixel unit includes:

performing horizontal interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of thepixel unit i by using the determined horizontal interpolation filterwith the phase of Q that is corresponding to the pixel unit i, to obtaina horizontal interpolation filtering result; and performing verticalinterpolation filtering on the horizontal interpolation filtering resultby using the determined vertical interpolation filter with the phase ofQ that is corresponding to the pixel unit i, to obtain a predicted pixelvalue of the pixel unit i, where the pixel unit i is any one of the Ppixel units; or

performing vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and performing horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

In addition, if a pixel unit has only one phase (that is, has only ahorizontal phase or a vertical phase), interpolation filtering needs tobe performed on a pixel of a reference pixel unit of the pixel unit onlyonce, to obtain a predicted pixel value of the pixel unit.

Optionally, in some possible implementations of the present disclosure,the determining motion vectors of W control points in a current pictureblock includes:

determining the W control points in the current picture block, anddetermining a candidate motion information unit set corresponding toeach of the W control points, where the candidate motion informationunit set corresponding to each control point includes at least onecandidate motion information unit;

determining a combined motion information unit set e including W motioninformation units, where each motion information unit in the combinedmotion information unit set e is selected from at least some motioninformation units in the candidate motion information unit setcorresponding to each of the W control points, and each combined motioninformation unit in the combined motion information unit set e includesa motion vector; and

performing prediction or motion estimation on W motion vectors in thecombined motion information unit set e to obtain the motion vectors ofthe W control points, or using W motion vectors included in the combinedmotion information unit set e as the motion vectors of the W controlpoints.

In some possible implementations of the present disclosure, precision ofeach motion vector in the candidate motion information unit set may be1/n of the pixel precision.

The picture prediction method may be applied to a video encodingprocess, or the picture prediction method may be applied to a videodecoding process.

To better understand the technical solutions of the embodiments of thepresent disclosure, the following provides descriptions fromperspectives of an encoder side and a decoder side by using examples.

The following first describes a solution from a perspective of anencoder side.

Referring to FIG. 3-a, FIG. 3-a is a schematic flowchart of anotherpicture prediction method according to another embodiment of the presentdisclosure. In an example shown in FIG. 3-a, the another pictureprediction method provided in the another embodiment of the presentdisclosure may include the following steps.

301. A video encoding apparatus determines W control points in a currentpicture block.

302. The video encoding apparatus determines motion vectors of the Wcontrol points.

The determining, by the video encoding apparatus, motion vectors of theW control points may include: determining a candidate motion informationunit set corresponding to each of the W control points, where thecandidate motion information unit corresponding to each control pointset includes at least one candidate motion information unit; determininga combined motion information unit set e including W motion informationunits, where each motion information unit in the combined motioninformation unit set e is selected from at least some motion informationunits in the candidate motion information unit set corresponding to eachof the W control points, and each combined motion information unit inthe combined motion information unit set e includes a motion vector; andperforming prediction or motion estimation on W motion vectors in thecombined motion information unit set e to obtain the motion vectors ofthe W control points, or using W motion vectors included in the combinedmotion information unit set e as the motion vectors of the W controlpoints.

In some possible implementations of the present disclosure, precision ofeach motion vector in the candidate motion information unit set may be1/n of pixel precision.

303. The video encoding apparatus obtains, by means of calculation,motion vectors of P pixel units of the current picture block by using amotion model and the motion vectors of the W control points.

P is a positive integer, and W and N are integers greater than 1.

The P pixel units are some or all of pixel units of the current pictureblock.

A motion vector of each of the P pixel units is used to determine acorresponding reference pixel unit, in a reference picture, of acorresponding pixel unit. Therefore, the motion vector of each of the Ppixel units may be used to determine the corresponding reference pixelunit, in the reference picture, of the corresponding pixel unit.

Precision of the determined motion vectors of the W control points is1/n of the pixel precision.

Precision of the motion vector that is obtained by means of calculationand that is of each of the P pixel units is 1/N of the pixel precision.

W, n, and N are integers greater than 1.

N is greater than n. P is a positive integer.

Because N is greater than n, the precision of the motion vector that isobtained by means of calculation and that is of each of the P pixelunits is higher than the precision of the determined motion vectors ofthe W control points. That is, the higher-precision motion vectors ofthe P pixel units of the current picture block are obtained.

In some possible implementations of the present disclosure, the motionvectors of the W control points are predicted based on a motion vector,whose precision is 1/n of the pixel precision, of an encoded pictureblock or a decoded picture block that surrounds the current pictureblock.

In some possible implementations of the present disclosure, when themotion vectors of the W control points are based on predicted values,precision of the predicted values is also 1/n of the pixel precision,and differences between the motion vectors, whose precision is 1/n ofthe pixel precision, of the control points and the correspondingpredicted values may be written into a bitstream. Correspondingly, themotion vectors, whose precision is 1/n of the pixel precision, of the Wcontrol points may be obtained, by means of prediction, on a decoderside by using the predicted difference between the W motion vectors andthe predicted motion vector and by using the motion vector, whoseprecision is 1/n of the pixel precision, of the decoded picture blockthat surrounds the current picture block, where the predicted differenceis obtained from the bitstream.

In some possible implementations of the present disclosure, the motionmodel may be, for example, a translational motion model, an affinemotion model, a rotational motion model, a parabolic motion model, ashearing motion model, a zooming motion model, a perspective motionmodel, or a bilinear motion model.

For example, in some possible implementations of the present disclosure,the motion model may be represented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

For another example, in some possible implementations of the presentdisclosure, the motion model may be represented as follows when W isequal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

The foregoing examples are described by using the affine motion model.When a translational motion model, a rotational motion model, a shearingmotion model, a zooming motion model, a perspective motion model, aparabolic motion model, a bilinear motion model, or the like is used,reference may be made to the foregoing examples. Details are notdescribed herein again.

304. The video encoding apparatus determines a corresponding referencepixel unit, in a reference picture, of each of the P pixel units byusing a motion vector of each of the P pixel units.

Optionally, in some possible implementations of the present disclosure,the determining a corresponding reference pixel unit, in a referencepicture, of each of the P pixel units by using a motion vector of eachof the P pixel units may include: obtaining, by means of calculation, aninteger-pixel location of each of the P pixel units by using the motionvector of each of the P pixel units; and searching, by using the motionvector of each of the P pixel units, the reference picture for areference pixel unit corresponding to the integer-pixel location of eachof the P pixel units, where the reference pixel unit that iscorresponding to the integer-pixel location of each of the P pixel unitsand that is found in the reference picture is the reference pixel unit,in the reference picture, of each of the P pixel units.

Specifically, for example, an integer-pixel location of a pixel unit imay be obtained by means of calculation by using a motion vector of thepixel unit i of the P pixel units, and the reference picture may besearched, by using the motion vector of the pixel unit i, for areference pixel unit corresponding to the integer-pixel location of thepixel unit i, where the reference pixel unit that is corresponding tothe integer-pixel location of the pixel unit i and that is found in thereference picture is a reference pixel unit, in the reference picture,of the pixel unit i. The pixel unit i may be any one of the P pixelunits. For example, the corresponding reference pixel unit, in thereference picture, of each of the P pixel units may be determinedaccording to a manner similar to that of determining the reference pixelunit, in the reference picture, of the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, an integer-pixel location of each ofthe P pixel units by using the motion vector of each of the P pixelunits includes:

obtaining, by means of calculation, the integer-pixel location of eachof the P pixel units according to the following formula by using themotion vector of each of the P pixel units:x Int=[v _(Nx) /N], or x Int=v _(Nx) ≥M.y Int=[v _(Ny) /N], or y Int=v _(Ny) ≥M.

-   -   where

M is equal to log₂ N when N is an integral power of 2, (xInt, yInt)represents integer-pixel location coordinates of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Nx) represents ahorizontal component of a motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, and v_(Ny) represents a vertical component of themotion vector, whose precision is 1/N of the pixel precision, of thepixel unit with the coordinates of (x, y) in the current picture block.

For example, referring to FIG. 3-b, square boxes in FIG. 3-b representpixels at integer-pixel locations adjacent to a current location, andtriangles represent sub-pixels.

305. The video encoding apparatus performs interpolation filtering on apixel of the corresponding reference pixel unit, in the referencepicture, of each of the P pixel units by using an interpolation filterwith a phase of Q, to obtain a predicted pixel value of each of the Ppixel units.

Q is an integer greater than n.

In some possible implementations of the present disclosure, a value of Nmay be a preset fixed value, and Q may be greater than or equal to N.When the value of N may be a preset fixed value, it indicates that theprecision of the motion vectors, obtained by means of calculation byusing the motion model and the motion vectors of the W control points,of the P pixel units of the current picture block is unnecessarilyrelated to a size of the current picture block. In other words, forexample, based on the solution of this embodiment, the predicted pixelvalue with preset fixed precision can be obtained without anintermediate process for obtaining a lower-precision predicted pixelvalue by performing lower-precision interpolation filtering.

For example, W may be equal to 2, 3, 4, 5, 6, 8, or another value.

For example, P may be equal to 1, 2, 3, 4, 5, 6, 8, 10, 15, 16, 21, 32,64, or another value.

For example, Q may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, N may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, n may be equal to 8, 2, 4, or another value.

In some possible implementations of the present disclosure. N may be anintegral power of 2, or certainly, N may be another positive integer.

In some possible implementations of the present disclosure, theperforming interpolation filtering on a pixel of the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using an interpolation filter with a phase of Q includes:

obtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units; determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, wherea filter coefficient used by the interpolation filter is correspondingto the phase; and performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

Specifically, for example, a phase of the pixel unit i may be obtainedby means of calculation by using the motion vector of the pixel unit iof the P pixel units; an interpolation filter with a phase of Q that iscorresponding to the pixel unit i may be determined based on the phaseof the pixel unit i, where a filter coefficient used by theinterpolation filter is corresponding to the phase; and interpolationfiltering may be performed on a pixel of the corresponding referencepixel unit, in the reference picture, of the pixel unit i by using thedetermined interpolation filter with the phase of Q that iscorresponding to the pixel unit i. The pixel unit i may be any one ofthe P pixel units. For example, interpolation filtering may be performedon each of the P pixel units according to a manner similar to that ofperforming interpolation filtering on the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units includes:obtaining, by means of calculation, the phase of each of the P pixelunits according to the following formula by using the motion vector ofeach of the P pixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1);Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1);

-   -   where

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block, Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the phase includes a horizontal phase and a vertical phase; and thedetermining, based on the phase of each pixel unit, the interpolationfilter with the phase of Q that is corresponding to the pixel unitincludes: determining, based on the horizontal phase of each pixel unit,a horizontal interpolation filter with a phase of Q that iscorresponding to the corresponding pixel unit; and determining, based onthe vertical phase of each pixel unit, a vertical interpolation filterwith a phase of Q that is corresponding to the corresponding pixel unit,where a filter coefficient used by the horizontal interpolation filteris corresponding to the horizontal phase, and a filter coefficient usedby the vertical interpolation filter is corresponding to the verticalphase.

Specifically, for example, a horizontal interpolation filter with aphase of Q that is corresponding to the pixel unit i may be determinedbased on a horizontal phase of the pixel unit i, and a verticalinterpolation filter with a phase of Q that is corresponding to thepixel unit i may be determined based on a vertical phase of the pixelunit i, where a filter coefficient used by the horizontal interpolationfilter is corresponding to the horizontal phase of the pixel unit i, anda filter coefficient used by the vertical interpolation filter iscorresponding to the vertical phase of the pixel unit i. The pixel uniti may be any one of the P pixel units. For example, the interpolationfilter with the phase of Q that is corresponding to each of the P pixelunits may be determined according to a manner similar to that ofdetermining the interpolation filter with the phase of Q that iscorresponding to the pixel unit i.

Optionally, in some possible implementations of the present disclosure,the performing interpolation filtering on the pixel of the correspondingreference pixel unit, in the reference picture, of each pixel unit byusing the determined interpolation filter with the phase of Q that iscorresponding to the pixel unit includes:

performing horizontal interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of thepixel unit i by using the determined horizontal interpolation filterwith the phase of Q that is corresponding to the pixel unit i, to obtaina horizontal interpolation filtering result; and performing verticalinterpolation filtering on the horizontal interpolation filtering resultby using the determined vertical interpolation filter with the phase ofQ that is corresponding to the pixel unit i, to obtain a predicted pixelvalue of the pixel unit i, where the pixel unit i is any one of the Ppixel units; or

performing vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and performing horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

In addition, if a pixel unit has only one phase (that is, has only ahorizontal phase or a vertical phase), interpolation filtering needs tobe performed on a pixel of a reference pixel unit of the pixel unit onlyonce, to obtain a predicted pixel value of the pixel unit.

306. The video encoding apparatus may obtain a predicted residual of thecurrent picture block by using original pixel values of the P pixelunits and predicted pixel values of the P pixel units of the currentpicture block, and the video encoding apparatus may write the predictedresidual of the current picture block into a video bitstream.

It can be learnt from the foregoing that, in the solution of thisembodiment, the video encoding apparatus obtains, by means ofcalculation, the motion vector, whose precision is 1/N of the pixelprecision, of each pixel unit of the current picture block by using themotion model and the motion vectors, whose precision is 1/n of the pixelprecision, of the W control points, where N is greater than n. In otherwords, the precision of the motion vector that is obtained by means ofcalculation and that is of each pixel unit of the current picture blockis higher than the precision of the determined motion vectors of the Wcontrol points. The higher-precision motion vector is obtained first.Therefore, the higher-precision motion vector of each pixel unit of thecurrent picture block is used to determine the corresponding referencepixel unit, in the reference picture, of each pixel unit of the currentpicture block, and interpolation filtering is performed on the pixel ofthe corresponding reference pixel unit, in the reference picture, ofeach pixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity oftimes of interpolation filtering required for obtaining, by means ofprediction, the higher-precision predicted pixel value of the currentpicture block (for example, an intermediate process for obtaining thelower-precision predicted pixel value by performing lower-precisioninterpolation filtering may not be required), so as to reduce a quantityof intermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

The following describes a solution from a perspective of a decoder side.

Referring to FIG. 4, FIG. 4 is a schematic flowchart of another pictureprediction method according to another embodiment of the presentdisclosure. In an example shown in FIG. 4, the another pictureprediction method provided in the another embodiment of the presentdisclosure may include the following steps.

401. A video decoding apparatus determines W control points in a currentpicture block.

402. The video decoding apparatus determines motion vectors of the Wcontrol points.

The determining, by the video decoding apparatus, motion vectors of theW control points may include: determining a candidate motion informationunit set corresponding to each of the W control points, where thecandidate motion information unit set corresponding to each controlpoint includes at least one candidate motion information unit;determining a combined motion information unit set e including W motioninformation units, where each motion information unit in the combinedmotion information unit set e is selected from at least some motioninformation units in the candidate motion information unit setcorresponding to each of the W control points, and each combined motioninformation unit in the combined motion information unit set e includesa motion vector; and performing prediction or motion estimation on Wmotion vectors in the combined motion information unit set e to obtainthe motion vectors of the W control points, or using W motion vectorsincluded in the combined motion information unit set e as the motionvectors of the W control points.

In some possible implementations of the present disclosure, precision ofeach motion vector in the candidate motion information unit set may be1/n of pixel precision.

403. The video decoding apparatus obtains, by means of calculation,motion vectors of P pixel units of the current picture block by using amotion model and the motion vectors of the W control points.

P is a positive integer, and W and N are integers greater than 1.

The P pixel units are some or all of pixel units of the current pictureblock.

A motion vector of each of the P pixel units is used to determine acorresponding reference pixel unit, in a reference picture, of acorresponding pixel unit. Therefore, the motion vector of each of the Ppixel units may be used to determine the corresponding reference pixelunit, in the reference picture, of the corresponding pixel unit.

Precision of the determined motion vectors of the W control points is1/n of the pixel precision.

Precision of the motion vector that is obtained by means of calculationand that is of each of the P pixel units is 1/N of the pixel precision.

W, n, and N are integers greater than 1.

N is greater than n. P is a positive integer.

Because N is greater than n, the precision of the motion vector that isobtained by means of calculation and that is of each of the P pixelunits is higher than the precision of the determined motion vectors ofthe W control points. That is, the higher-precision motion vectors ofthe P pixel units of the current picture block are obtained.

In some possible implementations of the present disclosure, the motionvectors of the W control points are predicted based on a motion vector,whose precision is 1/n of the pixel precision, of an encoded pictureblock or a decoded picture block that surrounds the current pictureblock, where n is a positive integer, and n is less than N.

In some possible implementations of the present disclosure, when themotion vectors of the W control points are based on predicted values,precision of the predicted values is also 1/n of the pixel precision,and differences between the motion vectors, whose precision is 1/n ofthe pixel precision, of the control points and the correspondingpredicted values may be written into a bitstream.

In some possible implementations of the present disclosure, the motionmodel may be, for example, a translational motion model, an affinemotion model, a rotational motion model, a parabolic motion model, ashearing motion model, a zooming motion model, a perspective motionmodel, or a bilinear motion model.

For example, in some possible implementations of the present disclosure,the motion model may be represented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

For another example, in some possible implementations of the presentdisclosure, the motion model may be represented as follows when W isequal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

The foregoing examples are described by using the affine motion model.When a translational motion model, a rotational motion model, a shearingmotion model, a zooming motion model, a perspective motion model, aparabolic motion model, a bilinear motion model, or the like is used,reference may be made to the foregoing examples. Details are notdescribed herein again.

404. The video decoding apparatus determines a corresponding referencepixel unit, in a reference picture, of each of the P pixel units byusing a motion vector of each of the P pixel units.

Optionally, in some possible implementations of the present disclosure,the determining the corresponding reference pixel unit, in the referencepicture, of each of the P pixel units by using the motion vector of eachof the P pixel units may include: obtaining, by means of calculation, aninteger-pixel location of each of the P pixel units by using the motionvector of each of the P pixel units; and searching, by using the motionvector of each of the P pixel units, the reference picture for areference pixel unit corresponding to the integer-pixel location of eachof the P pixel units, where the reference pixel unit that iscorresponding to the integer-pixel location of each of the P pixel unitsand that is found in the reference picture is the reference pixel unit,in the reference picture, of each of the P pixel units.

Specifically, for example, an integer-pixel location of a pixel unit imay be obtained by means of calculation by using a motion vector of thepixel unit i of the P pixel units, and the reference picture may besearched, by using the motion vector of the pixel unit i, for areference pixel unit corresponding to the integer-pixel location of thepixel unit i, where the reference pixel unit that is corresponding tothe integer-pixel location of the pixel unit i and that is found in thereference picture is a reference pixel unit, in the reference picture,of the pixel unit i. The pixel unit i may be any one of the P pixelunits. For example, the corresponding reference pixel unit, in thereference picture, of each of the P pixel units may be determinedaccording to a manner similar to that of determining the reference pixelunit, in the reference picture, of the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, an integer-pixel location of each ofthe P pixel units by using the motion vector of each of the P pixelunits includes:

obtaining, by means of calculation, the integer-pixel location of eachof the P pixel units according to the following formula by using themotion vector of each of the P pixel units:x Int=[v _(Nx) /N], or x Int=v _(Nx) ≥M;y Int=[v _(Ny) /N], or y Int=v _(Ny) ≥M;

-   -   where

M is equal to log₂ N when N is an integral power of 2, (xInt, yInt)represents integer-pixel location coordinates of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Nx) represents ahorizontal component of a motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, and v_(Ny) represents a vertical component of themotion vector, whose precision is 1/N of the pixel precision, of thepixel unit with the coordinates of (x, y) in the current picture block.

405. The video decoding apparatus performs interpolation filtering on apixel of the reference pixel unit, in the reference picture, of each ofthe P pixel units by using an interpolation filter with a phase of Q, toobtain a predicted pixel value of each of the P pixel units.

Q is an integer greater than n.

In some possible implementations of the present disclosure, a value of Nmay be a preset fixed value, and Q may be greater than or equal to N.When the value of N may be a preset fixed value, it indicates that theprecision of the motion vectors, obtained by means of calculation byusing the motion model and the motion vectors of the W control points,of the P pixel units of the current picture block is unnecessarilyrelated to a size of the current picture block. In other words, forexample, based on the solution of this embodiment, the predicted pixelvalue with preset fixed precision can be obtained without anintermediate process for obtaining a lower-precision predicted pixelvalue by performing lower-precision interpolation filtering.

For example, W may be equal to 2, 3, 4, 5, 6, 8, or another value.

For example, P may be equal to 1, 2, 3, 4, 5, 6, 8, 10, 15, 16, 21, 32,64, or another value.

For example, Q may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, N may be equal to 128, 9, 18, 24, 256, 8, 10, 15, 16, 21,32, 64, or another value.

For example, n may be equal to 8, 2, 4, or another value.

In some possible implementations of the present disclosure, N may be anintegral power of 2, or certainly, N may be another positive integer.

In some possible implementations of the present disclosure, theperforming interpolation filtering on a pixel of the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using an interpolation filter with a phase of Q includes:

obtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units; determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, wherea filter coefficient used by the interpolation filter is correspondingto the phase; and performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

Specifically, for example, a phase of the pixel unit i may be obtainedby means of calculation by using the motion vector of the pixel unit iof the P pixel units; an interpolation filter with a phase of Q that iscorresponding to the pixel unit i may be determined based on the phaseof the pixel unit i, where a filter coefficient used by theinterpolation filter is corresponding to the phase; and interpolationfiltering may be performed on a pixel of the corresponding referencepixel unit, in the reference picture, of the pixel unit i by using thedetermined interpolation filter with the phase of Q that iscorresponding to the pixel unit i. The pixel unit i may be any one ofthe P pixel units. For example, interpolation filtering may be performedon each of the P pixel units according to a manner similar to that ofperforming interpolation filtering on the pixel unit i.

In some possible implementations of the present disclosure, theobtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units includes:obtaining, by means of calculation, the phase of each of the P pixelunits according to the following formula by using the motion vector ofeach of the P pixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1).Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1).

-   -   where

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block, Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is UN of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the phase includes a horizontal phase and a vertical phase; and thedetermining, based on the phase of each pixel unit, the interpolationfilter with the phase of Q that is corresponding to the pixel unitincludes: determining, based on the horizontal phase of each pixel unit,a horizontal interpolation filter with a phase of Q that iscorresponding to the corresponding pixel unit; and determining, based onthe vertical phase of each pixel unit, a vertical interpolation filterwith a phase of Q that is corresponding to the corresponding pixel unit,where a filter coefficient used by the horizontal interpolation filteris corresponding to the horizontal phase, and a filter coefficient usedby the vertical interpolation filter is corresponding to the verticalphase.

Specifically, for example, a horizontal interpolation filter with aphase of Q that is corresponding to the pixel unit i may be determinedbased on a horizontal phase of the pixel unit i, and a verticalinterpolation filter with a phase of Q that is corresponding to thepixel unit i may be determined based on a vertical phase of the pixelunit i, where a filter coefficient used by the horizontal interpolationfilter is corresponding to the horizontal phase of the pixel unit i, anda filter coefficient used by the vertical interpolation filter iscorresponding to the vertical phase of the pixel unit i. The pixel uniti may be any one of the P pixel units. For example, the interpolationfilter with the phase of Q that is corresponding to each of the P pixelunits may be determined according to a manner similar to that ofdetermining the interpolation filter with the phase of Q that iscorresponding to the pixel unit i.

Optionally, in some possible implementations of the present disclosure,the performing interpolation filtering on the pixel of the correspondingreference pixel unit, in the reference picture, of each pixel unit byusing the determined interpolation filter with the phase of Q that iscorresponding to the pixel unit includes:

performing horizontal interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of thepixel unit i by using the determined horizontal interpolation filterwith the phase of Q that is corresponding to the pixel unit i, to obtaina horizontal interpolation filtering result; and performing verticalinterpolation filtering on the horizontal interpolation filtering resultby using the determined vertical interpolation filter with the phase ofQ that is corresponding to the pixel unit i, to obtain a predicted pixelvalue of the pixel unit i, where the pixel unit i is any one of the Ppixel units; or

performing vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and performing horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

In addition, if a pixel unit has only one phase (that is, has only ahorizontal phase or a vertical phase), interpolation filtering needs tobe performed on a pixel of a reference pixel unit of the pixel unit onlyonce, to obtain a predicted pixel value of the pixel unit.

406. The video decoding apparatus reconstructs the current picture blockby using a predicted pixel value of the current picture block and apredicted residual, in a video bitstream, of the current picture block.

It can be learnt from the foregoing that, in the solution of thisembodiment, the video decoding apparatus obtains, by means ofcalculation, the motion vector, whose precision is 1/N of the pixelprecision, of each pixel unit of the current picture block by using themotion model and the motion vectors, whose precision is 1/n of the pixelprecision, of the W control points, where N is greater than n. In otherwords, the precision of the motion vector that is obtained by means ofcalculation and that is of each pixel unit of the current picture blockis higher than the precision of the determined motion vectors of the Wcontrol points. The higher-precision motion vector is obtained first.Therefore, the higher-precision motion vector of each pixel unit of thecurrent picture block is used to determine the corresponding referencepixel unit, in the reference picture, of each pixel unit of the currentpicture block, and interpolation filtering is performed on the pixel ofthe corresponding reference pixel unit, in the reference picture, ofeach pixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity oftimes of interpolation filtering required for obtaining, by means ofprediction, the higher-precision predicted pixel value of the currentpicture block (for example, an intermediate process for obtaining thelower-precision predicted pixel value by performing lower-precisioninterpolation filtering may not be required), so as to reduce a quantityof intermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

The following describes, by using examples, some possible specificimplementations of determining a combined motion information unit set eincluding W motion information units in the foregoing embodiments.

The determining a combined motion information unit set e including Wmotion information units may include: determining, from A candidatecombined motion information unit sets, the combined motion informationunit set e including the W motion information units, where each motioninformation unit included in each of the A candidate combined motioninformation unit sets is selected from at least some motion informationunits, complying with a constraint condition, in a candidate motioninformation unit set corresponding to each of the W control points, A isa positive integer, the A candidate combined motion information unitsets are different from each other, and each of the A candidate combinedmotion information unit sets includes W motion information units.

Optionally, in some possible implementations of the present disclosure,the A candidate combined motion information unit sets satisfy at leastone of a first condition, a second condition, a third condition, afourth condition, or a fifth condition.

The first condition includes: A motion manner, indicated by a motioninformation unit in any one of the A candidate combined motioninformation unit sets, of the current picture block is anon-translational motion.

The second condition includes: Prediction directions corresponding totwo motion information units in any one of the A candidate combinedmotion information unit sets are the same.

The third condition includes: Reference-frame indexes corresponding totwo motion information units in any one of the A candidate combinedmotion information unit sets are the same.

The fourth condition includes: An absolute value of a difference betweenhorizontal components of motion vectors of two motion information unitsin any one of the A candidate combined motion information unit sets isless than or equal to a horizontal component threshold, or an absolutevalue of a difference between horizontal components of a motion vectorof a control point Z and a motion vector of one motion information unitin any one of the A candidate combined motion information unit sets isless than or equal to a horizontal component threshold, where thecontrol point Z of the current picture block is different from any oneof the W control points.

The fifth condition includes: An absolute value of a difference betweenvertical components of motion vectors of two motion information units inany one of the A candidate combined motion information unit sets is lessthan or equal to a vertical component threshold, or an absolute value ofa difference between vertical components of a motion vector of a controlpoint Z and a motion vector of any motion information unit in one of theA candidate combined motion information unit sets is less than or equalto a vertical component threshold, where the control point Z of thecurrent picture block is different from any one of the W control points.

Optionally, in some possible implementations of the present disclosure,the determining, from A candidate combined motion information unit setsby the video encoding/decoding apparatus, the combined motioninformation unit set e including the W motion information units mayinclude: determining, from the A candidate combined motion informationunit sets and based on distortion or a rate-distortion cost, thecombined motion information unit set e including the W motion vectors.

Optionally, the rate-distortion cost corresponding to the combinedmotion information unit set e is less than or equal to a rate-distortioncost corresponding to any combined motion information unit set, otherthan the combined motion information unit set e, in the A candidatecombined motion information unit sets.

Optionally, the distortion corresponding to the combined motioninformation unit set e is less than or equal to distortion correspondingto any combined motion information unit set, other than the combinedmotion information unit set e, in the A candidate combined motioninformation unit sets.

A rate-distortion cost corresponding to a candidate combined motioninformation unit set of the A candidate combined motion information unitsets (for example, the combined motion information unit set e of the Acandidate combined motion information unit sets) may be, for example, arate-distortion cost corresponding to a predicted pixel value that is ofa picture block (for example, the current picture block) and that isobtained by means of pixel value prediction performed on the pictureblock by using the candidate combined motion information unit set (forexample, the combined motion information unit set e).

Distortion corresponding to a candidate combined motion information unitset of the A candidate combined motion information unit sets (forexample, the combined motion information unit set e of the A candidatecombined motion information unit sets) may be, for example, distortionbetween an original pixel value of a picture block (for example, thecurrent picture block) and a predicted pixel value that is of thepicture block and that is obtained by means of pixel value predictionperformed on the picture block by using the candidate combined motioninformation unit set (for example, the combined motion information unitset e) (that is, distortion between an original pixel value and apredicted pixel value that are of the picture block).

In some possible implementations of the present disclosure, distortionbetween an original pixel value of a picture block (for example, thecurrent picture block) and a predicted pixel value that is of thepicture block and that is obtained by means of pixel value predictionperformed on the picture block by using a candidate combined motioninformation unit set (for example, the combined motion information unitset e) may be specifically, for example, a sum of squared differences(SSD), a sum of absolute differences (SAD), a sum of differences, oranother distortion parametric value that can measure distortion, betweenthe original pixel value of the picture block (for example, the currentpicture block) and the predicted pixel value that is of the pictureblock and that is obtained by means of pixel value prediction performedon the picture block by using the candidate combined motion informationunit set (for example, the combined motion information unit set e).

The following describes, by using examples, some possible manners ofdetermining W control points in a current picture block.

Optionally, in some possible implementations of the present disclosure,the W control points include W control points of an upper left controlpoint, an upper right control point, a lower left control point, and acentral control point a1 in the current picture block.

The upper left control point in the current picture block is an upperleft vertex of the current picture block or a pixel block, in thecurrent picture block, including an upper left vertex of the currentpicture block. The lower left control point in the current picture blockis a lower left vertex of the current picture block or a pixel block, inthe current picture block, including a lower left vertex of the currentpicture block. The upper right control point in the current pictureblock is an upper right vertex of the current picture block or a pixelblock, in the current picture block, including an upper right vertex ofthe current picture block. The central control point a1 of the currentpicture block is a central pixel of the current picture block or a pixelblock, in the current picture block, including a central pixel of thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,a candidate motion information unit set corresponding to the upper leftcontrol point in the current picture block includes a motion informationunit of x1 pixel units. The x1 pixel units include at least one pixelunit (for example, picture blocks A, B, and C in FIG. 2-b) spatiallyadjacent to the upper left control point in the current picture blockand/or at least one pixel unit temporally adjacent to the upper leftcontrol point in the current picture block, where x1 is a positiveinteger.

For example, the x1 pixel units may include at least one of thefollowing: a pixel unit, in a video frame temporally adjacent to a videoframe to which the current picture block belongs, whose location is thesame as that of the upper left control point in the current pictureblock, a pixel unit that is spatially adjacent to and that is on theleft of the current picture block; a pixel unit that is spatiallyadjacent to and that is on the upper left of the current picture block;or a pixel unit that is spatially adjacent to and that is on an upperside of the current picture block.

Optionally, in some possible implementations of the present disclosure,a candidate motion information unit set corresponding to the upper rightcontrol point in the current picture block includes a motion informationunit of x2 pixel units. The x2 pixel units include at least one pixelunit (for example, picture blocks E and D in FIG. 2-b) spatiallyadjacent to the upper right control point in the current picture blockand/or at least one pixel unit temporally adjacent to the upper rightcontrol point in the current picture block, where x2 is a positiveinteger.

For example, the x2 pixel units may include at least one of thefollowing: a pixel unit, in a video frame temporally adjacent to a videoframe to which the current picture block belongs, whose location is thesame as that of the upper right control point in the current pictureblock; a pixel unit that is spatially adjacent to and that is on theright of the current picture block; a pixel unit that is spatiallyadjacent to and that is on the upper right of the current picture block;or a pixel unit that is spatially adjacent to and that is on an upperside of the current picture block.

Optionally, in some possible implementations of the present disclosure,

a candidate motion information unit set corresponding to the lower leftcontrol point in the current picture block includes a motion informationunit of x3 pixel units. The x3 pixel units include at least one pixelunit spatially adjacent to the lower left control point in the currentpicture block and/or at least one pixel unit temporally adjacent to thelower left control point in the current picture block, where x3 is apositive integer.

For example, the x3 pixel units may include at least one of thefollowing: a pixel unit, in a video frame temporally adjacent to a videoframe to which the current picture block belongs, whose location is thesame as that of the lower left control point in the current pictureblock; a pixel unit that is spatially adjacent to and that is on theleft of the current picture block; a pixel unit that is spatiallyadjacent to and that is on the lower left of the current picture block;or a pixel unit that is spatially adjacent to and that is on a lowerside of the current picture block.

Optionally, in some possible implementations of the present disclosure,a candidate motion information unit set corresponding to the centralcontrol point a1 of the current picture block includes a motioninformation unit of x5 pixel units. One of the x5 pixel units is a pixelunit a2.

A location of the central control point a1 in a video frame to which thecurrent picture block belongs is the same as a location of the pixelunit a2 in a video frame adjacent to the video frame to which thecurrent picture block belongs, where x5 is a positive integer.

The following tables list a correspondence between a phase of a pixelunit and a filter coefficient.

Table 1 lists a correspondence between a filter coefficient of a64-phase interpolation filter with a gain scale factor of 256 and aphase of a pixel unit.

Table 2 lists a correspondence between a filter coefficient of a64-phase interpolation filter with a gain scale factor of 64 and a phaseof a pixel unit.

TABLE 1 Phase Filter coefficient 0 {0, 0, 0, 256, 0, 0, 0, 0} 1 {0, 1,−3, 256, 4, −2, 0, 0} 2 {0, 2, −7, 255, 8, −3, 1, 0} 3 {−1, 3, −10, 255,12, −4, 1, 0} 4 {−1, 4, −13, 254, 16, −5, 2, −1} 5 {−1, 5, −16, 253, 20,−7, 2, 0} 6 {−1, 6, −18, 251, 25, −9, 3, −1} 7 {−2, 7, −21, 250, 29,−10, 4, −1} 8 {−2, 8, −23, 248, 34, −12, 4, −1} 9 {−2, 8, −25, 246, 38,−13, 5, −1} 10 {−2, 9, −27, 244, 43, −15, 5, −1} 11 {−2, 10, −30, 242,48, −16, 6, −2} 12 {−2, 10, −31, 239, 52, −17, 5, 0} 13 {−2, 10, −32,237, 57, −18, 6, −2} 14 {−2, 11, −34, 234, 63, −21, 7, −2} 15 {−2, 11,−35, 231, 68, −21, 6, −2} 16 {−3, 13, −38, 228, 74, −24, 9, −3} 17 {−2,12, −38, 224, 78, −24, 7, −1} 18 {−3, 14, −40, 221, 84, −27, 10, −3} 19{−2, 12, −39, 217, 88, −27, 8, −1} 20 {−3, 13, −40, 213, 94, −28, 9, −2}21 {−3, 15, −43, 210, 100, −31, 11, −3} 22 {−3, 13, −41, 205, 104, −30,9, −1} 23 {−3, 12, −41, 201, 110, −31, 9, −1} 24 {−3, 15, −43, 197, 116,−35, 12, −3} 25 {−3, 14, −43, 192, 121, −35, 12, −2} 26 {−2, 13, −42,187, 126, −35, 10, −1} 27 {−3, 14, −43, 183, 132, −37, 12, −2} 28 {−2,13, −42, 178, 137, −38, 12, −2} 29 {−3, 14, −42, 173, 143, −39, 12, −2}30 {−3, 15, −43, 169, 148, −41, 14, −3} 31 {−3, 13, −41, 163, 153, −40,13, −2} 32 {−3, 13, −40, 158, 158, −40, 13, −3} 33 {−2, 13, −40, 153,163, −41, 13, −3} 34 {−3, 14, −41, 148, 169, −43, 15, −3} 35 {−2, 12,−39, 143, 173, −42, 14, −3} 36 {−2, 12, −38, 137, 178, −42, 13, −2} 37{−2, 12, −37, 132, 183, −43, 14, −3} 38 {−1, 10, −35, 126, 187, −42, 13,−2} 39 {−2, 12, −35, 121, 192, −43, 14, −3} 40 {−3, 12, −35, 116, 197,−43, 15, −3} 41 {−1, 9, −31, 110, 201, −41, 12, −3} 42 {−1, 9, −30, 104,205, −41, 13, −3} 43 {−3, 11, −31, 100, 210, −43, 15, −3} 44 {−2, 9,−28, 94, 213, −40, 13, −3} 45 {−1, 8, −27, 88, 217, −39, 12, −2} 46 {−3,10, −27, 84, 221, −40, 14, −3} 47 {−1, 7, −24, 78, 224, −38, 12, −2} 48{−3, 9, −24, 74, 228, −38, 13, −3} 49 {−2, 6, −21, 68, 231, −35, 11, −2}50 {−2, 7, −21, 63, 234, −34, 11, −2} 51 {−2, 6, −18, 57, 237, −32, 10,−2} 52 {0, 5, −17, 52, 239, −31, 10, −2} 53 {−2, 6, −16, 48, 242, −30,10, −2} 54 {−1, 5, −15, 43, 244, −27, 9, −2} 55 {−1, 5, −13, 38, 246,−25, 8, −2} 56 {−1, 4, −12, 34, 248, −23, 8, −2} 57 {−1, 4, −10, 29,250, −21, 7, −2} 58 {−1, 3, −9, 25, 251, −18, 6, −1} 59 {0, 2, −7, 20,253, −16, 5, −1} 60 {−1, 2, −5, 16, 254, −13, 4, −1} 61 {0, 1, −4, 12,255, −10, 3, −1} 62 {0, 1, −3, 8, 255, −7, 2, 0} 63 {0, 0, −2, 4, 256,−3, 1, 0}

TABLE 2 Phase Filter coefficient 0 {0, 0, 0, 64, 0, 0, 0, 0} 1 {0, 0,−1, 64, 1, 0, 0, 0} 2 {0, 0, −2, 64, 3, −1, 0, 0} 3 {0, 1, −2, 64, 3,−2, 0, 0} 4 {0, 1, −3, 63, 4, −1, 0, 0} 5 {0, 1, −4, 63, 5, −2, 1, 0} 6{0, 1, −4, 63, 6, −2, 1, −1} 7 {0, 1, −5, 62, 7, −2, 1, 0} 8 {0, 2, −6,62, 8, −3, 1, 0} 9 {0, 1, −6, 62, 10, −3, 1, −1} 10 {0, 2, −7, 61, 11,−3, 1, −1} 11 {−1, 3, 7, 60, 12, −4, 1, 0} 12 {0, 2, −8, 60, 13, −4, 1,0} 13 {0, 2, −8, 59, 14, −4, 1, 0} 14 {0, 3, −8, 58, 16, −5, 1, −1} 15{0, 3, −9, 58, 17, −5, 1, −1} 16 {−1, 3, −9, 57, 18, −6, 2, 0} 17 {−1,3, −9, 56, 19, −6, 2, 0} 18 {−1, 3, −10, 55, 21, 6, 2, 0} 19 {−1, 3,−10, 54, 22, −7, 2, 1} 20 {0, 3, −10, 53, 23, −7, 2, 0} 21 {−1, 3, −10,52, 25, 7, 2, 0} 22 {−1, 3, −10, 51, 26, −8, 2, 1} 23 {0, 3, −10, 50,27, −8, 2, 0} 24 {−1, 3, −10, 49, 29, −8, 2, 0} 25 {−1, 3, −10, 48, 30,8, 2, 0} 26 {−1, 3, −10, 47, 32, −9, 2, 0} 27 {−1, 3, −11, 46, 33, −9,3, 0} 28 {−1, 3, −10, 44, 34, −9, 3, 0} 29 {−1, 3, −10, 43, 36, −9, 3,−1} 30 {−1, 3, −10, 42, 37, −10, 3, 0} 31 {−1, 4, −10, 41, 38, −10, 3,−1} 32 {−1, 4, −11, 40, 40, −11, 4, −1} 33 {−1, 3, −10, 38, 41, −10, 4,−1} 34 {0, 3, −10, 37, 42, −10, 3, −1} 35 {−1, 3, −9, 36, 43, −10, 3,−1} 36 {0, 3, −9, 34, 44, −10, 3, −1} 37 {0, 3, −9, 33, 46, −11, 3, −1}38 {0, 2, −9, 32, 47, −10, 3, −1} 39 {0, 2, −8, 30, 48, −10, 3, −1} 40{0, 2, −8, 29, 49, −10, 3, −1} 41 {0, 2, −8, 27, 50, −10, 3, 0} 42 {1,2, −8, 26, 51, −10, 3, −1} 43 {0, 2, −7, 25, 52, −10, 3, −1} 44 {0, 2,−7, 23, 53, −10, 3, 0} 45 {1, 2, −7, 22, 54, −10, 3, −1} 46 {0, 2, −6,21, 55, −10, 3, −1} 47 {0, 2, −6, 19, 56, −9, 3, −1} 48 {0, 2, −6, 18,57, −9, 3, −1} 49 {−1, 1, −5, 17, 58, −9, 3, 0} 50 {−1, 1, −5, 16, 58,−8, 3, 0} 51 {0, 1, −4, 14, 59, −8, 2, 0} 52 {0, 1, −4, 13, 60, −8, 2,0} 53 {0, 1, −4, 12, 60, −7, 3, −1} 54 {−1, 1, −3, 11, 61, 7, 2, 0} 55{−1, 1, −3, 10, 62, −6, 1, 0} 56 {0, 1, −3, 8, 62, −6, 2, 0} 57 {0, 1,−2, 7, 62, −5, 1, 0} 58 {−1, 1, −2, 6, 63, −4, 1, 0} 59 {0, 1, −2, 5,63, −4, 1, 0} 60 {0, 0, −1, 4, 63, −3, 1, 0} 61 {0, 0, −2, 3, 64, −2, 1,0} 62 {0, 0, −1, 3, 64, −2, 0, 0} 63 {0, 0, 0, 1, 64, −1, 0, 0}

For example, when a horizontal phase of a pixel unit is x=12, if a64-phase interpolation filter with a gain scale factor of 256 is used, ahorizontal interpolation filtering result S may be represented asfollows:S=((−2)×x ₀+10×x ₁+(−31)×x ₂+239×x ₂+52×x ₄+(−17)×x ₅+5×x ₆+0×x₇)−offset)/256.

A predicted pixel value of the pixel unit may be obtained by using thehorizontal interpolation filtering result S, where offset may be anyinteger.

The following uses some test data to present technical effects of thesolutions of the embodiments of the present disclosure.

Table 3 and Table 4 provide contrast of some test performance between aconventional solution and the solutions of the embodiments of thepresent disclosure. Table 3 lists test performance of the conventionalsolution, and Table 4 lists test performance of solutions of someembodiments of the present disclosure.

TABLE 3 Class Sequence Y BD-Rate U BD-Rate V BD-Rate EncTime DecTimeClass Affine Dolphin −1.4% 0.0% −0.2% 209.2% 209.6% City −4.2% −3.8%−4.5% 218.5% 169.5% Crew −1.8% −0.9% −2.4% 212.0% 199.1% Jets −16.5%−17.2% −16.3% 252.0% 184.5% Tractor −27.8% −22.3% −22.9% 225.5% 343.1%Flowervase −4.8% −6.9% −4.7% 248.2% 170.9% BlueSky −9.5% −6.3% −5.2%237.3% 287.1% TableCard −6.5% −2.9% −4.7% 217.7% 218.2% SpinCalendar−26.0% −28.9% −24.7% 247.4% 212.1% Average All −10.9% −9.9% −9.5% 229.8%221.6%

TABLE 4 Class Sequence Y BD-Rate U BD-Rate V BD-Rate EncTime DecTimeClass Affine Dolphin −1.3% −0.8% −0.6% 148.0% 96.7% City −4.3% −2.6%−4.0% 160.3% 102.7% Crew −1.7% −1.4% −2.8% 154.7% 109.5% Jets −21.3%−19.7% −21.2% 175.1% 116.3% Tractor −29.1% −25.3% −25.1% 154.4% 125.3%Flowervase −6.8% −7.2% −3.9% 172.6% 113.8% BlueSky −10.1% −8.7% −6.8%165.4% 127.5% TableCard −6.0% −2.7% −4.7% 151.8% 109.5% SpinCalendar−32.8% −33.4% −28.8% 172.6% 113.1% Average All −12.6% −11.3% −10.9%161.7% 112.7%

It can be leant from contrast between the foregoing two tables that, thetechnical solutions of the embodiments of the present disclosure have agreat improvement in encoding and decoding performance compared with theprior art.

The following further provides a related apparatus configured toimplement the foregoing solutions.

Referring to FIG. 5, an embodiment of the present disclosure provides apicture prediction apparatus 500, which may include a first determiningunit 510, a calculation unit 520, and an interpolation filtering unit540.

The first determining unit 510 is configured to determine motion vectorsof W control points in a current picture block.

The calculation unit 520 is configured to obtain, by means ofcalculation, motion vectors of P pixel units of the current pictureblock by using a motion model and the motion vectors of the W controlpoints, where precision of the determined motion vectors of the Wcontrol points is 1/n of pixel precision, precision of the motion vectorthat is obtained by means of calculation and that is of each of the Ppixel units is 1/N of the pixel precision, and the P pixel units aresome or all of pixel units of the current picture block.

The motion vector of each of the P pixel units is used to determine acorresponding reference pixel unit, in a reference picture, of acorresponding pixel unit. W, n, and N are integers greater than 1. N isgreater than n. P is a positive integer.

The interpolation filtering unit 540 is configured to performinterpolation filtering on a pixel of the reference pixel unit, in thereference picture, of each of the P pixel units by using aninterpolation filter with a phase of Q, to obtain a predicted pixelvalue of each of the P pixel units.

The picture prediction apparatus 500 may further include a seconddetermining unit 530, configured to determine the correspondingreference pixel unit, in the reference picture, of each of the P pixelunits by using the motion vector of each of the P pixel units.

Optionally, in some possible implementations of the present disclosure,a value of N is a preset fixed value, and Q is less than or equal to N.

Optionally, in some possible implementations of the present disclosure,a horizontal component or a vertical component of one of the motionvectors of the W control points is amplified N times in the motion modelby using N, or a component difference between motion vectors of any twoof the W control points is amplified N times in the motion model byusing N.

Optionally, in some possible implementations of the present disclosure,

the second determining unit 530 is specifically configured to: obtain,by means of calculation, an integer-pixel location of each of the Ppixel units by using the motion vector of each of the P pixel units; andsearch, by using the motion vector of each of the P pixel units, thereference picture for a reference pixel unit corresponding to theinteger-pixel location of each of the P pixel units, where the referencepixel unit that is corresponding to the integer-pixel location of eachof the P pixel units and that is found in the reference picture is thereference pixel unit, in the reference picture, of each of the P pixelunits.

Optionally, in some possible implementations of the present disclosure,in an aspect of obtaining, by means of calculation, an integer-pixellocation of each of the P pixel units by using the motion vector of eachof the P pixel units, the second determining unit 530 is specificallyconfigured to:

obtain, by means of calculation, the integer-pixel location of each ofthe P pixel units according to the following formula by using the motionvector of each of the P pixel units:x Int=[v _(Nx) /N], or x Int=v _(Nx) ≥M;y Int=[v _(Ny) /N], or y Int=v _(Ny) ≥M;

-   -   where

M is equal to log₂ N when N is an integral power of 2, (xInt, yInt)represents integer-pixel location coordinates of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Nx) represents ahorizontal component of a motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, and v_(Ny) represents a vertical component of themotion vector, whose precision is 1/N of the pixel precision, of thepixel unit with the coordinates of (x, y) in the current picture block.

Optionally, in some possible implementations of the present disclosure,

the interpolation filtering unit is specifically configured to: obtain,by means of calculation, a phase of each of the P pixel units by usingthe motion vector of each of the P pixel units; determine, based on thephase of each pixel unit, the interpolation filter with the phase of Qthat is corresponding to the corresponding pixel unit, where a filtercoefficient used by the interpolation filter is corresponding to thephase; and perform interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

Optionally, in some possible implementations of the present disclosure,in an aspect of obtaining, by means of calculation, a phase of each ofthe P pixel units by using the motion vector of each of the P pixelunits, the interpolation filtering unit is specifically configured toobtain, by means of calculation, the phase of each of the P pixel unitsaccording to the following formula by using the motion vector of each ofthe P pixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1);Y′=abs(v _(Ny))% N, or Y′=v _(Ny) &((1≤M)−1);

-   -   where

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block. Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the phase includes a horizontal phase and a vertical phase; and

in an aspect of determining, based on the phase of each pixel unit, theinterpolation filter with the phase of Q that is corresponding to thecorresponding pixel unit, the interpolation filtering unit isspecifically configured to: determine, based on the horizontal phase ofeach pixel unit, a horizontal interpolation filter with a phase of Qthat is corresponding to the corresponding pixel unit; and determine,based on the vertical phase of each pixel unit, a vertical interpolationfilter with a phase of Q that is corresponding to the correspondingpixel unit, where a filter coefficient used by the horizontalinterpolation filter is corresponding to the horizontal phase, and afilter coefficient used by the vertical interpolation filter iscorresponding to the vertical phase.

Optionally, in some possible implementations of the present disclosure,in an aspect of performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit, theinterpolation filtering unit is specifically configured to:

perform horizontal interpolation filtering on a pixel of a correspondingreference pixel unit, in the reference picture, of a pixel unit i byusing a determined horizontal interpolation filter with a phase of Qthat is corresponding to the pixel unit i, to obtain a horizontalinterpolation filtering result; and perform vertical interpolationfiltering on the horizontal interpolation filtering result by using adetermined vertical interpolation filter with a phase of Q that iscorresponding to the pixel unit i, to obtain a predicted pixel value ofthe pixel unit i, where the pixel unit i is any one of the P pixelunits; or

perform vertical interpolation filtering on a pixel of a correspondingreference pixel unit, in the reference picture, of a pixel unit j byusing a determined vertical interpolation filter with a phase of Q thatis corresponding to the pixel unit j, to obtain a vertical interpolationfiltering result; and perform horizontal interpolation filtering on thevertical interpolation filtering result by using a determined horizontalinterpolation filter with a phase of Q that is corresponding to thepixel unit j, to obtain a predicted pixel value of the pixel unit j,where the pixel unit j is any one of the P pixel units.

Optionally, in some possible implementations of the present disclosure,the motion model is a translational motion model, an affine motionmodel, a rotational motion model, a zooming motion model, a parabolicmotion model, a shearing motion model, a perspective motion model, or abilinear motion model.

Optionally, in some possible implementations of the present disclosure,

the motion model is represented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block.(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

Optionally, in some possible implementations of the present disclosure,

the motion model is represented as follows when W is equal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

Optionally, in some possible implementations of the present disclosure,the motion vectors of the W control points are predicted based on amotion vector, whose precision is 1/n of the pixel precision, of anencoded picture block or a decoded picture block that surrounds thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the picture prediction apparatus 500 is applied to a video encodingapparatus, or the picture prediction apparatus 500 is applied to a videodecoding apparatus.

It can be understood that, functions of the functional modules of thepicture prediction apparatus 500 in this embodiment may be specificallyimplemented according to the methods in the foregoing methodembodiments. For a specific implementation process of the pictureprediction apparatus 500, reference may be made to related descriptionsin the foregoing method embodiments. Details are not described hereinagain. The picture prediction apparatus 500 may be any apparatus thatneeds to output or play a video, for example, a notebook computer, atablet computer, a personal computer, a mobile phone, or another device.

It can be learnt that, in this embodiment, the picture predictionapparatus 500 obtains, by means of calculation, the motion vector, whoseprecision is 1/N of the pixel precision, of each pixel unit of thecurrent picture block by using the motion model and the motion vectors,whose precision is 1/n of the pixel precision, of the W control points,where N is greater than n. In other words, the precision of the motionvector that is obtained by means of calculation and that is of eachpixel unit of the current picture block is higher than the precision ofthe determined motion vectors of the W control points. Thehigher-precision motion vector is obtained first. Therefore, thehigher-precision motion vector of each pixel unit of the current pictureblock is used to determine the corresponding reference pixel unit, inthe reference picture, of each pixel unit of the current picture block,and interpolation filtering is performed on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity oftimes of interpolation filtering required for obtaining, by means ofprediction, the higher-precision predicted pixel value of the currentpicture block (for example, an intermediate process for obtaining alower-precision predicted pixel value by performing lower-precisioninterpolation filtering may not be required), so as to reduce a quantityof intermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

Referring to FIG. 6, FIG. 6 is a structural block diagram of a pictureprediction apparatus 600 according to another embodiment of the presentdisclosure. The picture prediction apparatus 600 may include at leastone processor 601, a memory 605, and at least one communications bus602. The communications bus 602 is configured to implement a connectionand communication between the components.

The picture prediction apparatus 600 may optionally include at least onenetwork interface 604 and/or a user interface 603. The user interface603 may include a display (for example, holographic imaging device, acathode-ray tube, or a projector), a pointing device (for example, amouse, a trackball, a touch panel, or a touchscreen), a camera and/or asound pickup apparatus, or the like.

The memory 605 may include a read-only memory and a random accessmemory, and provide an instruction and data for the processor 601. Apart of the memory 605 may further include a non-volatile random accessmemory.

In some implementations, the memory 605 stores the following elements:an executable module or a data structure, their subsets, or theirextended sets; and the memory 605 includes:

an operating system 6051, including various system programs, andconfigured to implement various basic services and handle hardware-basedtasks; and

an application program module 6052, including various applicationprograms, and configured to implement various application services.

In this embodiment of the present disclosure, by invoking the program orthe instruction that is stored in the memory 605, the processor 601 isconfigured to: determine motion vectors of W control points in a currentpicture block; obtain, by means of calculation, motion vectors of Ppixel units of the current picture block by using a motion model and themotion vectors of the W control points, where precision of thedetermined motion vectors of the W control points is 1/n of pixelprecision, precision of the motion vector that is obtained by means ofcalculation and that is of each of the P pixel units is 1/N of the pixelprecision, the P pixel units are some or all of pixel units of thecurrent picture block, the motion vector of each of the P pixel units isused to determine a corresponding reference pixel unit, in a referencepicture, of a corresponding pixel unit, W, n, and N are integers greaterthan 1, N is greater than n, and P is a positive integer; and performinterpolation filtering on a pixel of the corresponding reference pixelunit, in the reference picture, of each of the P pixel units by using aninterpolation filter with a phase of Q, to obtain a predicted pixelvalue of each of the P pixel units, where Q is an integer greater thann.

Optionally, in some possible implementations of the present disclosure,a value of N is a preset fixed value, and Q is less than or equal to N.

Optionally, in some possible implementations of the present disclosure,a horizontal component or a vertical component of one of the motionvectors of the W control points is amplified N times in the motion modelby using N, or a component difference between motion vectors of any twoof the W control points is amplified N times in the motion model byusing N.

Optionally, in some possible implementations of the present disclosure,the determining, by the processor, a corresponding reference pixel unit,in a reference picture, of each of the P pixel units by using the motionvector of each of the P pixel units includes:

obtaining, by means of calculation, an integer-pixel location of each ofthe P pixel units by using the motion vector of each of the P pixelunits; and searching, by using the motion vector of each of the P pixelunits, the reference picture for a reference pixel unit corresponding tothe integer-pixel location of each of the P pixel units, where thereference pixel unit that is corresponding to the integer-pixel locationof each of the P pixel units and that is found in the reference pictureis the reference pixel unit, in the reference picture, of each of the Ppixel units.

Optionally, in some possible implementations of the present disclosure,the obtaining, by means of calculation by the processor, aninteger-pixel location of each of the P pixel units by using the motionvector of each of the P pixel units includes:

obtaining, by means of calculation, the integer-pixel location of eachof the P pixel units according to the following formula by using themotion vector of each of the P pixel units:x Int=[v _(Nx) /N], or x Int=v _(Nx) ≥M;y Int=[v _(Ny) /N], or y Int=v _(Ny) ≥M;

-   -   where

M is equal to log₂ N when N is an integral power of 2, (xInt, yInt)represents integer-pixel location coordinates of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Nx) represents ahorizontal component of a motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, and v_(Ny) represents a vertical component of themotion vector, whose precision is 1/N of the pixel precision, of thepixel unit with the coordinates of (x, y) in the current picture block.

Optionally, in some possible implementations of the present disclosure,the performing, by the processor, interpolation filtering on a pixel ofthe reference pixel unit, in the reference picture, of each of the Ppixel units by using an interpolation filter with a phase of Q includes:

obtaining, by means of calculation, a phase of each of the P pixel unitsby using the motion vector of each of the P pixel units; determining,based on the phase of each pixel unit, the interpolation filter with thephase of Q that is corresponding to the corresponding pixel unit, wherea filter coefficient used by the interpolation filter is correspondingto the phase; and performing interpolation filtering on the pixel of thecorresponding reference pixel unit, in the reference picture, of eachpixel unit by using the determined interpolation filter with the phaseof Q that is corresponding to the corresponding pixel unit.

Optionally, in some possible implementations of the present disclosure,the obtaining, by means of calculation by the processor, a phase of eachof the P pixel units by using the motion vector of each of the P pixelunits includes: obtaining, by means of calculation, the phase of each ofthe P pixel units according to the following formula by using the motionvector of each of the P pixel units:X′=abs(v _(Nx))% N, or X′=v _(Nx) &((1≤M)−1);Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1);

-   -   where

M is equal to log₂ N when N is an integral power of 2, X′ represents ahorizontal phase of a pixel unit with coordinates of (x, y) in thecurrent picture block Y′ represents a vertical phase of the pixel unitwith the coordinates of (x, y) in the current picture block, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of the pixel unit with the coordinates of(x, y) in the current picture block, and v_(Ny) represents a verticalcomponent of the motion vector, whose precision is 1/N of the pixelprecision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,the phase includes a horizontal phase and a vertical phase; and thedetermining, by the processor and based on the phase of each pixel unit,the interpolation filter with the phase of Q that is corresponding tothe pixel unit includes: determining, based on the horizontal phase ofeach pixel unit, a horizontal interpolation filter with a phase of Qthat is corresponding to the corresponding pixel unit; and determining,based on the vertical phase of each pixel unit, a vertical interpolationfilter with a phase of Q that is corresponding to the correspondingpixel unit, where a filter coefficient used by the horizontalinterpolation filter is corresponding to the horizontal phase, and afilter coefficient used by the vertical interpolation filter iscorresponding to the vertical phase.

Optionally, in some possible implementations of the present disclosure,the performing, by the processor, interpolation filtering on the pixelof the corresponding reference pixel unit, in the reference picture, ofeach pixel unit by using the determined interpolation filter with thephase of Q that is corresponding to the pixel unit includes:

performing horizontal interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit i by using a determined horizontal interpolation filter with aphase of Q that is corresponding to the pixel unit i, to obtain ahorizontal interpolation filtering result; and performing verticalinterpolation filtering on the horizontal interpolation filtering resultby using a determined vertical interpolation filter with a phase of Qthat is corresponding to the pixel unit i, to obtain a predicted pixelvalue of the pixel unit i, where the pixel unit i is any one of the Ppixel units; or

performing vertical interpolation filtering on a pixel of acorresponding reference pixel unit, in the reference picture, of a pixelunit j by using a determined vertical interpolation filter with a phaseof Q that is corresponding to the pixel unit j, to obtain a verticalinterpolation filtering result; and performing horizontal interpolationfiltering on the vertical interpolation filtering result by using adetermined horizontal interpolation filter with a phase of Q that iscorresponding to the pixel unit j, to obtain a predicted pixel value ofthe pixel unit j, where the pixel unit j is any one of the P pixelunits.

Optionally, in some possible implementations of the present disclosure,the motion model is a translational motion model, an affine motionmodel, a rotational motion model, a parabolic motion model, a shearingmotion model, a zooming motion model, a perspective motion model, or abilinear motion model.

Optionally, in some possible implementations of the present disclosure,

the motion model is represented as follows when W is equal to 2:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

L represents a width or a height of the current picture block,(v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whoseprecision is 1/n of the pixel precision, of two control points, v_(Nx)represents a horizontal component of a motion vector, whose precision is1/N of the pixel precision, of a pixel unit with coordinates of (x, y)in the current picture block, and v_(Ny) represents a vertical componentof the motion vector, whose precision is 1/N of the pixel precision, ofthe pixel unit with the coordinates of (x, y) in the current pictureblock.

Optionally, in some possible implementations of the present disclosure,

the motion model is represented as follows when W is equal to 3:

$\left\{ {\begin{matrix}{v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\{v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}}\end{matrix};{{or}\left\{ {\begin{matrix}{v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\{v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}}\end{matrix},} \right.}} \right.$where

v_(Nx) represents a horizontal component of a motion vector, whoseprecision is 1/N of the pixel precision, of a pixel unit withcoordinates of (x, y) in the current picture block, v_(Ny) represents avertical component of the motion vector, whose precision is 1/N of thepixel precision, of the pixel unit with the coordinates of (x, y) in thecurrent picture block, (v_(0x),v_(0y)) (v_(1x),v_(1y)), and(v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of thepixel precision, of three control points, w represents a width of thecurrent picture block, and h represents a height of the current pictureblock.

Optionally, in some possible implementations of the present disclosure,the motion vectors of the W control points are predicted based on amotion vector, whose precision is 1/n of the pixel precision, of anencoded picture block or a decoded picture block that surrounds thecurrent picture block.

Optionally, in some possible implementations of the present disclosure,a value of N is a preset fixed value.

Optionally, in some possible implementations of the present disclosure,the picture prediction apparatus 600 is applied to a video encodingapparatus, or the picture prediction apparatus 600 is applied to a videodecoding apparatus.

It can be understood that, functions of the functional modules of thepicture prediction apparatus 600 in this embodiment may be specificallyimplemented according to the methods in the foregoing methodembodiments. For a specific implementation process of the pictureprediction apparatus 600, reference may be made to related descriptionsin the foregoing method embodiments. Details are not described hereinagain. The picture prediction apparatus 600 may be any apparatus thatneeds to output or play a video, for example, a notebook computer, atablet computer, a personal computer, a mobile phone, or another device.

It can be learnt that, in the picture prediction method provided in thisembodiment, the picture prediction apparatus 600 obtains, by means ofcalculation, the motion vector, whose precision is 1/N of the pixelprecision, of each pixel unit of the current picture block by using themotion model and the motion vectors, whose precision is 1/n of the pixelprecision, of the W control points, where N is greater than n. In otherwords, the precision of the motion vector that is obtained by means ofcalculation and that is of each pixel unit of the current picture blockis higher than the precision of the determined motion vectors of the Wcontrol points. The higher-precision motion vector is obtained first.Therefore, the higher-precision motion vector of each pixel unit of thecurrent picture block is used to determine the corresponding referencepixel unit, in the reference picture, of each pixel unit of the currentpicture block, and interpolation filtering is performed on the pixel ofthe corresponding reference pixel unit, in the reference picture, ofeach pixel unit of the current picture block by using the interpolationfilter with the phase of Q (Q is greater than n), to obtain thepredicted pixel value of each pixel unit of the current picture block.It can be learnt that, the foregoing manner helps reduce a quantity oftimes of interpolation filtering required for obtaining, by means ofprediction, the higher-precision predicted pixel value of the currentpicture block (for example, an intermediate process for obtaining alower-precision predicted pixel value by performing lower-precisioninterpolation filtering may not be required), so as to reduce a quantityof intermediate caches and memory operations that are required forinterpolation filtering during a picture prediction process, and reducecalculation complexity during the picture prediction process.

In the foregoing embodiments, the description of each embodiment hasrespective focuses. For a part that is not described in detail in anembodiment, reference may be made to related descriptions in otherembodiments.

In the several embodiments provided in this application, it should beunderstood that the disclosed apparatus may be implemented in othermanners. For example, the described apparatus embodiments are merelyexamples. For example, the unit division is merely logical functiondivision and may be other division in actual implementation. Forexample, a plurality of units or components may be combined orintegrated into another system, or some features may be ignored or notperformed. In addition, the displayed or discussed mutual couplings ordirect couplings or communication connections may be implemented byusing some interfaces. The indirect couplings or communicationconnections between the apparatuses or units may be implemented inelectronic or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one position, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual requirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentdisclosure may be integrated into one processing unit, or each of theunits may exist alone physically, or at least two units may beintegrated into one unit. The integrated unit may be implemented in aform of hardware, or may be implemented in a form of a softwarefunctional unit.

When the integrated unit is implemented in the form of a softwarefunctional unit and sold or used as an independent product, theintegrated unit may be stored in a computer readable storage medium.Based on such an understanding, the technical solutions of the presentdisclosure essentially, or the part contributing to the prior art, orall or some of the technical solutions may be implemented in a form of asoftware product. The computer software product is stored in a storagemedium and includes several instructions for instructing a computerdevice (which may be a personal computer, a server, a network device, orthe like) to perform all or some of the steps of the methods describedin the embodiments of the present disclosure. The foregoing storagemedium includes: any medium that can store program code, such as a USBflash drive, a read-only memory (ROM, Read-Only Memory), a random accessmemory (RAM, Random Access Memory), a removable hard disk, a magneticdisk, or an optical disc.

The foregoing embodiments are merely intended to describe the technicalsolutions of the present disclosure, but not to limit the presentdisclosure. Although the present disclosure is described in detail withreference to the foregoing embodiments, persons of ordinary skill in theart should understand that they may still make modifications to thetechnical solutions described in the foregoing embodiments or makeequivalent replacements to some technical features thereof, withoutdeparting from the scope of the technical solutions of the embodimentsof the present disclosure.

What is claimed is:
 1. A picture prediction method, comprising: determining motion vectors of W control points in a current picture block, wherein the motion vectors of the W control points is determined based on a predictor with precision of 1/n of a pixel precision and a difference of motion vector with precision of 1/n of the pixel precision; adjusting, the precision of the motion vector of W control points to be 1/N of the pixel precision; obtaining, by calculation, motion vectors of P pixel units of the current picture block by using a motion model and the motion vectors of the W control points, wherein, precision of the motion vector of each of the P pixel units is 1/N of the pixel precision, the motion vector of each of the P pixel units is used to determine a corresponding reference pixel unit in a reference picture of a corresponding pixel unit, W, n, and N are integers greater than 1, N is greater than n, and P is a positive integer; and performing interpolation filtering on a pixel of the corresponding reference pixel unit by using an interpolation filter with a phase of Q, to obtain a predicted pixel value of each of the P pixel units, wherein Q is an integer greater than n.
 2. The method according to claim 1, wherein a value of N is a preset fixed value, and Q is less than or equal to N.
 3. The method according to claim 1, wherein a horizontal component or a vertical component of one of the motion vectors of the W control points is amplified N times in the motion model, or a component difference between motion vectors of any two of the W control points is amplified N times in the motion model.
 4. The method according to claim 1, wherein the performing interpolation filtering comprises: obtaining, by calculation, a phase of each of the P pixel units by using the motion vector of each of the P pixel units; determining, based on the phase of each of the P pixel units, the interpolation filter with the phase of Q that is corresponding to the pixel unit, wherein a filter coefficient used by the interpolation filter is corresponding to the phase; and performing interpolation filtering on the pixel of the corresponding pixel unit, in the reference picture, of each pixel unit by using the determined interpolation filter with the phase of Q that is corresponding to the pixel unit.
 5. The method according to claim 4, wherein the obtaining the phase of each of the P pixel units comprises: obtaining the phase of each of the P pixel units according to the following formula by using the motion vector of each of the P pixel units: X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1); Y′=abs(v _(Ny))N, or Y′=v _(Ny)&((1≤M)−1); wherein M is equal to log₂ N, N is an integral power of 2, X′ represents a horizontal phase of a pixel unit with coordinates of (x, y) in the current picture block, Y′ represents a vertical phase of the pixel unit with the coordinates of (x, y) in the current picture block, v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block, and v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block.
 6. The method according to claim 4, wherein the phase comprises a horizontal phase and a vertical phase; and the determining the interpolation filter with the phase of Q comprises: determining, based on the horizontal phase of each pixel unit, a horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit; and determining, based on the vertical phase of each pixel unit, a vertical interpolation filter with a phase of Q that is corresponding to the pixel unit, wherein a filter coefficient used by the horizontal interpolation filter is corresponding to the horizontal phase, and a filter coefficient used by the vertical interpolation filter is corresponding to the vertical phase.
 7. The method according to claim 6, wherein the performing interpolation filtering comprises: performing horizontal interpolation filtering on a pixel of a corresponding reference pixel unit, in the reference picture, of a pixel unit i by using a determined horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit i, to obtain a horizontal interpolation filtering result; and performing vertical interpolation filtering on the horizontal interpolation filtering result by using a determined vertical interpolation filter with a phase of Q that is corresponding to the pixel unit i, to obtain a predicted pixel value of the pixel unit i, wherein the pixel unit i is any one of the P pixel units.
 8. The method according to claim 6, wherein the performing interpolation filtering comprises: performing vertical interpolation filtering on a pixel of a corresponding pixel unit, in the reference picture, of a pixel unit j by using a determined vertical interpolation filter with a phase of Q that is corresponding to the pixel unit j, to obtain a vertical interpolation filtering result; and performing horizontal interpolation filtering on the vertical interpolation filtering result by using a determined horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit j, to obtain a predicted pixel value of the pixel unit j, wherein the pixel unit j is any one of the P pixel units.
 9. The method according to claim 1, wherein the motion model is a translational motion model, an affine motion model, a rotational motion model, a parabolic motion model, a shearing motion model, a zooming motion model, a perspective motion model, or a bilinear motion model.
 10. The method according to claim 1, wherein the motion model is represented as follows, wherein W is equal to 2: $\left\{ {\begin{matrix} {v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\ {v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}} \end{matrix};{{or}\left\{ {\begin{matrix} {v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\ {v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}} \end{matrix},} \right.}} \right.$ wherein L represents a width or a height of the current picture block, (v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whose precision is 1/n of the pixel precision, of two control points, v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of a pixel unit with coordinates of (x, y) in the current picture block, and v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block.
 11. The method according to claim 1, wherein the motion model is represented as follows, wherein W is equal to 3: $\left\{ {\begin{matrix} {v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\ {v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}} \end{matrix};{{or}\left\{ {\begin{matrix} {v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\ {v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}} \end{matrix},} \right.}} \right.$ wherein v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of a pixel unit with coordinates of (x, y) in the current picture block, v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and (v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of the pixel precision, of three control points, w represents a width of the current picture block, and h represents a height of the current picture block.
 12. The method according to claim 1, wherein the motion vectors of the W control points are predicted based on a motion vector, whose precision is 1/n of the pixel precision, of an encoded picture block or a decoded picture block that surrounds the current picture block.
 13. The method according to claim 1, wherein the picture prediction method is applied to a video coding process or applied to a video decoding process.
 14. A picture prediction apparatus, comprising: a non-transitory memory storage comprising instructions; and one or more hardware processors in communication with the memory storage, wherein the one or more hardware processors execute the instructions to: determine motion vectors of W control points in a current picture block, wherein the motion vectors of the W control points is determined based on a predictor with precision of 1/n of a pixel precision and a difference of motion vector with precision of 1/n of the pixel precision; adjust, the precision of the motion vector of W control points to be 1/N of the pixel precision; obtain, by calculation, motion vectors of P pixel units of the current picture block by using a motion model and the motion vectors of the W control points, wherein precision of the motion vector of each of the P pixel units is 1/N of the pixel precision, the motion vector of each of the P pixel units is used to determine a corresponding reference pixel unit in a reference picture of a corresponding pixel unit, W, n, and N are integers greater than 1, N is greater than n, and P is a positive integer; and perform interpolation filtering on a pixel of the corresponding reference pixel unit by using an interpolation filter with a phase of Q, to obtain a predicted pixel value of each of the P pixel units, wherein Q is an integer greater than n.
 15. The apparatus according to claim 14, wherein a value of N is a preset fixed value, and Q is less than or equal to N.
 16. The apparatus according to claim 14, wherein a horizontal component or a vertical component of one of the motion vectors of the W control points is amplified N times in the motion model, or a component difference between motion vectors of any two of the W control points is amplified N times in the motion model.
 17. The apparatus according to claim 14, wherein the one or more hardware processors is configured to: obtain, by calculation, a phase of each of the P pixel units by using the motion vector of each of the P pixel units; determine, based on the phase of each of the P pixel units, the interpolation filter with the phase of Q that is corresponding to the pixel unit, wherein a filter coefficient used by the interpolation filter is corresponding to the phase; and perform interpolation filtering on the pixel of the corresponding pixel unit, in the reference picture, of each pixel unit by using the determined interpolation filter with the phase of Q that is corresponding to the pixel unit.
 18. The apparatus according to claim 17, wherein the one or more hardware processors is configured to: obtain the phase of each of the P pixel units according to the following formula by using the motion vector of each of the P pixel units: X′=abs(v _(Nx))% N, or X′=v _(Nx)&((1≤M)−1); Y′=abs(v _(Ny))% N, or Y′=v _(Ny)&((1≤M)−1); wherein M is equal to log₂ N, N is an integral power of 2, X′ represents a horizontal phase of a pixel unit with coordinates of (x, y) in the current picture block, Y′ represents a vertical phase of the pixel unit with the coordinates of (x, y) in the current picture block, v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block, and v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block.
 19. The apparatus according to claim 17, wherein the phase comprises a horizontal phase and a vertical phase; and the one or more hardware processors is configured to: determine, based on the horizontal phase of each pixel unit, a horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit; and determine, based on the vertical phase of each pixel unit, a vertical interpolation filter with a phase of Q that is corresponding to the pixel unit, wherein a filter coefficient used by the horizontal interpolation filter is corresponding to the horizontal phase, and a filter coefficient used by the vertical interpolation filter is corresponding to the vertical phase.
 20. The apparatus according to claim 19, wherein the one or more hardware processors is configured to: perform horizontal interpolation filtering on a pixel of a corresponding reference pixel unit, in the reference picture, of a pixel unit i by using a determined horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit i, to obtain a horizontal interpolation filtering result; and perform vertical interpolation filtering on the horizontal interpolation filtering result by using a determined vertical interpolation filter with a phase of Q that is corresponding to the pixel unit i, to obtain a predicted pixel value of the pixel unit i, wherein the pixel unit i is any one of the P pixel units.
 21. The apparatus according to claim 19, wherein the one or more hardware processors is configured to: perform vertical interpolation filtering on a pixel of a corresponding pixel unit, in the reference picture, of a pixel unit j by using a determined vertical interpolation filter with a phase of Q that is corresponding to the pixel unit j, to obtain a vertical interpolation filtering result; and perform horizontal interpolation filtering on the vertical interpolation filtering result by using a determined horizontal interpolation filter with a phase of Q that is corresponding to the pixel unit j, to obtain a predicted pixel value of the pixel unit j, wherein the pixel unit j is any one of the P pixel units.
 22. The apparatus according to claim 14, wherein the motion model is a translational motion model, an affine motion model, a rotational motion model, a parabolic motion model, a shearing motion model, a zooming motion model, a perspective motion model, or a bilinear motion model.
 23. The apparatus according to claim 14, wherein the motion model is represented as follows, wherein W is equal to 2: $\left\{ {\begin{matrix} {v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}y} + {Nv}_{0x}} \right)\text{/}n}} \\ {v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{L}y} + {Nv}_{0y}} \right)\text{/}n}} \end{matrix};{{or}\left\{ {\begin{matrix} {v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}x} - {\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\ {v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{L}x} + {\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{L}y} + {\left( {N\text{/}n} \right)v_{0y}}}} \end{matrix},} \right.}} \right.$ wherein L represents a width or a height of the current picture block, (v_(0x),v_(0y)) and (v_(1x),v_(1y)) represent motion vectors, whose precision is 1/n of the pixel precision, of two control points, v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of a pixel unit with coordinates of (x, y) in the current picture block, and v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block.
 24. The apparatus according to claim 14, wherein the motion model is represented as follows, wherein W is equal to 3: $\left\{ {\begin{matrix} {v_{Nx} = {\left( {{\frac{\left( {v_{1x} - v_{0x}} \right) \times N}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times N}{h}y} + {Nv}_{0x}} \right)\text{/}n}} \\ {v_{Ny} = {\left( {{\frac{\left( {v_{1y} - v_{0y}} \right) \times N}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times N}{h}y} + {Nv}_{0y}} \right)\text{/}n}} \end{matrix};{{or}\left\{ {\begin{matrix} {v_{Nx} = {{\frac{\left( {v_{1x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2x} - v_{0x}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0x}}}} \\ {v_{Ny} = {{\frac{\left( {v_{1y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{w}x} + {\frac{\left( {v_{2y} - v_{0y}} \right) \times \left( {N\text{/}n} \right)}{h}y} + {\left( {N\text{/}n} \right)v_{0y}}}} \end{matrix},} \right.}} \right.$ wherein v_(Nx) represents a horizontal component of a motion vector, whose precision is 1/N of the pixel precision, of a pixel unit with coordinates of (x, y) in the current picture block, v_(Ny) represents a vertical component of the motion vector, whose precision is 1/N of the pixel precision, of the pixel unit with the coordinates of (x, y) in the current picture block, (v_(0x),v_(0y)), (v_(1x),v_(1y)), and (v_(2x),v_(2y)) represent motion vectors, whose precision is 1/n of the pixel precision, of three control points, w represents a width of the current picture block, and h represents a height of the current picture block.
 25. The apparatus according to claim 14, wherein the motion vectors of the W control points are predicted based on a motion vector, whose precision is 1/n of the pixel precision, of an encoded picture block or a decoded picture block that surrounds the current picture block.
 26. The apparatus according to claim 14, wherein the current picture block is generated in a video coding process or applied to a video decoding process.
 27. A non-transitory computer-readable medium storing computer instructions, that when executed by one or more hardware processors, cause the one or more hardware processors to perform operations comprising: determining motion vectors of W control points in a current picture block, wherein the motion vectors of the W control points is determined based on a predictor with precision of 1/n of a pixel precision and a difference of motion vector with precision of 1/n of the pixel precision; adjusting, the precision of the motion vector of W control points to be 1/N of the pixel precision; obtaining, by calculation, motion vectors of P pixel units of the current picture block by using a motion model and the motion vectors of the W control points, wherein precision of the motion vector of each of the P pixel units is 1/N of the pixel precision, the motion vector of each of the P pixel units is used to determine a corresponding reference pixel unit in a reference picture of a corresponding pixel unit, W, n, and N are integers greater than 1, N is greater than n, and P is a positive integer; and performing interpolation filtering on a pixel of the corresponding reference pixel unit by using an interpolation filter with a phase of Q, to obtain a predicted pixel value of each of the P pixel units, wherein Q is an integer greater than n. 